Search:

Type: Posts; User: PhHein

Page 1 of 20 1 2 3 4

Search: Search took 0.18 seconds.

  1. Thread: Learning Java

    by PhHein
    Replies
    3
    Views
    116

    Re: Learning Java

    Oracle has some more: The Really Big Index
  2. Replies
    8
    Views
    115

    Re: Roman to ordinary number conversion

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

    by PhHein
    Replies
    1
    Views
    66

    Re: Regards

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

    by PhHein
    Replies
    1
    Views
    46

    Re: hi I'm April..

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

    by PhHein
    Replies
    10
    Views
    100

    Re: String

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

    by PhHein
    Replies
    10
    Views
    100

    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);
  7. Thread: String

    by PhHein
    Replies
    10
    Views
    100

    Re: String

    Reread my last reply. Where do you check the length of last_name?
  8. Thread: String

    by PhHein
    Replies
    10
    Views
    100

    Re: String

    Test whether the last name is shorter than 7 characters, if so leave it like it is, if not use only the first 6 characters.
  9. Replies
    3
    Views
    73

    [SOLVED] Re: Not sure why this is happening.

    You're welcome.
  10. Replies
    3
    Views
    73

    [SOLVED] Re: Not sure why this is happening.

    Whenever you use in.nextInt() you enter a number followed by ENTER. nextInt() reads the number from the buffer and the ENTER is still there and is read by the following nextLine().
    So whenever you...
  11. [SOLVED] Re: Converting Monetary Units

    remainingamount stays the same all the time. It's 135 when you calculate Quarters, which is already wrong as you forgot to calculate dollars first.
    It should be:
    Start:135
    after dollars: 35
    after...
  12. Re: What is the main use of Synchronization in java?

    Have a look here: Synchronization (The Java™ Tutorials > Essential Classes > Concurrency)
  13. Replies
    2
    Views
    100

    Re: Make a pause between every loop.

    Please repost your code and use formatting according to Announcements - What's Wrong With My Code?
    All indentation is lost and makes it unreadable.
  14. Re: Practice of hiding unsafe methods through polymorphism

    Why not:

    public class ExternalInterface implements ReadOnly {

    private InternalComponent cmp = new Container();

    public Provider() {
    cmp.setValue(42);
    }
  15. Re: New to Java, Where is a good place to learn?

    Have you had a look at the Oracle tutorials: The Java™ Tutorials
  16. Re: im new to java progamming laguage, little help pls, my code run well on eclips but does not want to run on the command prompt

    "does not want to run on the command prompt "

    What does that mean? Does it start a fire on your desk? Post all error messages you get.
  17. Replies
    7
    Views
    135

    Re: Throwing an exception?

    :D
  18. Replies
    7
    Views
    135

    Re: Throwing an exception?

    Inheritance (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)
  19. Re: Trying to understand calculations within a set method.

    The describe method doesn't return anything, it just prints the description to a console. A common solution would be to override toString() or to implement a public String getDescription() method.
  20. Re: Using loop within while (resultset.next())loop

    The sqls are different!
    VS1: and b.logtime between '"+date+" 00:00:00' and '"+date+" 23:59:59' and b.beam_current in("+s_user+") order by b.beam_current
    VS2: and b.logtime between '"+first+"' and...
  21. Replies
    7
    Views
    135

    Re: Throwing an exception?

    If you really need a new class extend Exception, if you only need to throw an Exception do it.
    Lesson: Exceptions (The Java™ Tutorials > Essential Classes)
  22. Re: how to access the webcam without a library?

    It's not possible.
  23. Re: Trying to understand calculations within a set method.

    Add a public getComission() method and in setPrice you calculate the comission i.e.


    //Mutator for price (SET)
    public void setPrice(double myPrice)
    {
    price = myPrice;
    ...
  24. Re: For loop. ProductCatalog, calls methods from Product class

    Well, have a look at the if in my pseudo code, you've misplaced it.
    The for loop cannot be executed that way. Reread the tutorial: The for Statement (The Java™ Tutorials > Learning the Java Language...
  25. Replies
    3
    Views
    110

    Re: Help with messy or pointless code

    What I see is that your method names start with capital letters. According to the code conventions they should be lower case.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4