Search:

Type: Posts; User: PhHein

Page 1 of 20 1 2 3 4

Search: Search took 0.62 seconds.

  1. Thread: Java Array

    by PhHein
    Replies
    3
    Views
    123

    Re: Java Array

    Hi, have a look at the tutorial page: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
  2. Replies
    2
    Views
    161

    Re: Learning Java but need some assistance

    Hi and welcome,
    what you see here is called an overflow. You can try it by creating a byte with the value of 127 and add 10 to it. You'll end up at -119. When the end of the upper range is reached...
  3. Replies
    8
    Views
    130

    Re: Debuging Simple Java Program

    What problem do you have? What do you get, what do you expect?
  4. Re: Need help with a Java beginning project! Any help would be appreciated!

    Starting Writing a Program
  5. Replies
    1
    Views
    108

    Re: Program keeps exiting

    Never compare Strings with ==. Use String.equals().
  6. Thread: Jlist display

    by PhHein
    Replies
    5
    Views
    129

    Re: Jlist display

    Hi again,
    your ListModel contains all Person instances. Add a ListSelectionListener to know which Person is selected. See the Oracle tutorial for examples:...
  7. Replies
    1
    Views
    175

    Re: Java Complex Data Types

    You just need a custom Shipment class with the listed attributes. Store all Shipment instances in a List.
  8. Thread: Jlist display

    by PhHein
    Replies
    5
    Views
    129

    Re: Jlist display

    Either you override toString() in Person, or you implement a custom ListCellRenderer
  9. Replies
    2
    Views
    79

    Re: Why am I getting this error

    You're creating a new award:

    award = new AthleticsAwardingBody();
    text.setText(award.getMessage());
    label.setIcon(award.getPrize(1).getIcon());
    What does award.getPrize(1) return? Does it have...
  10. Replies
    1
    Views
    75

    Re: I've got an equation wrong

    Please posrt your code
  11. Replies
    1
    Views
    80

    Re: Overriding the Collections.sort() Method

    You can pass a custom Comparator: http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#sort(List, Comparator)
  12. Re: How do I get my JList to refresh when refresh button pressed

    You need to notify the model that the underlying data have changed: http://docs.oracle.com/javase/7/docs/api/javax/swing/AbstractListModel.html#fireIntervalAdded(java.lang.Object, int, int)
  13. Replies
    30
    Views
    309

    Re: ResultsModel cannot resolve to a type

    What's ResultsModel supposed to be? Did you import it?
  14. Thread: ATM machine

    by PhHein
    Replies
    1
    Views
    83

    Re: ATM machine

    Sure, post your code and ask questions.
  15. Thread: Student Library

    by PhHein
    Replies
    1
    Views
    135

    Re: Student Library

    Yes, I can. What's your question?
  16. Re: How do I copy a multidimensional String array?

    Have a go yourself and ask when you get stuck. That's the only decent way of learning :)
  17. Re: How do I copy a multidimensional String array?

    You have to create new Strings with the same values as the original. String inherits Object's clone method. In your case it's pretty simple as you only deal with Strings:

    String[][] orig = {{"o1",...
  18. Replies
    5
    Views
    127

    Re: basketball players

    Hi and welcome, please use code formatting as described here: Announcements - What's Wrong With My Code?
    What problem do you have? Compiler errors, runtime exeptions, exploded radio?
  19. Replies
    7
    Views
    171

    Re: I have an issue with my code

    String smokingstatus
  20. Thread: Learning Java

    by PhHein
    Replies
    3
    Views
    221

    Re: Learning Java

    Oracle has some more: The Really Big Index
  21. Replies
    8
    Views
    163

    Re: Roman to ordinary number conversion

    Hey, please post your code.
  22. Thread: Regards

    by PhHein
    Replies
    1
    Views
    121

    Re: Regards

    Hi and welcome. Please take the time to read this: Announcements - What's Wrong With My Code?
  23. Thread: hi I'm April..

    by PhHein
    Replies
    1
    Views
    92

    Re: hi I'm April..

    Hi and welcome. Please take the time to read this: Announcements - What's Wrong With My Code?
  24. Thread: String

    by PhHein
    Replies
    10
    Views
    118

    Re: String

    :pbbbbbt: I was sick posting the same for the third time. I know that article.
  25. Thread: String

    by PhHein
    Replies
    10
    Views
    118

    Re: String

    if(last_name.length() >= 5){
    last_name = last_name.substring(0,5);
    }
    System.out.println("my username is: "+ first_name.charAt(0) + last_name + rnd);
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4