Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    @fredyeboah Please Edit your post and wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.
  2. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    That is from:
    System.out.println(j);
    It's what is returned from the default toString() method for a class. j is the class reference that was printed.
    The a$b is the name of the class. It says...
  3. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Have you got it working now?
  4. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Make the class b static by adding static before the word class:
    static class b {
  5. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Please copy the exact text of the error message. I do no understand the error message you posted.
    Please copy full text of error message and paste it here. Here is a sample:

    ...
  6. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    That looks like you can create an instance of the b class.

    Now try calling the b class's max() method using that new object (j) that the code creates.

    On Windows: To copy the contents of the...
  7. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Where does the code try to create a new instance of the b class?

    Take a look at the tutorial for some examples:
    Lesson: Object-Oriented Programming Concepts (The Java™ Tutorials > Learning the...
  8. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Try doing the first step: create an instance of the b class.
    You will need that to be able to call any methods in the b class.


    When you get errors you need to copy and paste the full text...
  9. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Sorry, the idea is for you to write the code and to ask us questions when you have a problem.

    Which part(s) are you having problems with?
    1) create instance of the b class
    2)calling the max()...
  10. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    Is the second line you want for output from the println statement in the b class's max() method?
    To execute the max() method you need to
    1)create an instance of the b class
    and use that to ...
  11. Thread: hello

    by Norm
    Replies
    27
    Views
    3,152

    [SOLVED] Re: hello

    What would a "printout of class b" look like? What does your code print now?
    Post the program's output and explain what is wrong with it and show what you want the output to look like.
Results 1 to 11 of 11