Search:

Type: Posts; User: bertu

Search: Search took 0.18 seconds.

  1. Replies
    3
    Views
    457

    Re: Why is this working?

    Thank you Norm:

    I executed the code from VS Code.
    What you see above is the full content of the code I run.
  2. Replies
    3
    Views
    457

    Why is this working?

    Hi there.
    I was trying some code on java exception handling. I expected it to throw an error, but it returned the arguement.
    What is going on?



    public class Main{

    public static void...
  3. Replies
    2
    Views
    874

    [SOLVED] Re: Why is this code not printing to console

    Oh my!
    I missed the modulo!

    Thank you very much!
  4. Replies
    2
    Views
    874

    [SOLVED] Why is this code not printing to console

    I was expecting the while loop inside the main method to print to console.
    What is happening here?




    class ControlFlow {
    public static void main(String[] args) {
  5. Replies
    8
    Views
    738

    Re: constructor method syntax error

    Thanks
  6. Replies
    8
    Views
    738

    Re: constructor method syntax error

    Thank you.
    As you suggested, when I corrected the code as below, the error has disappeared.

    items = new String[] {"doer", "kicker", "pusher"}

    One question:
    Why did you say {"doer", "kicker",...
  7. Replies
    8
    Views
    738

    Re: constructor method syntax error

    Norm
    Sorry again for missing the comment.
    I have edited the code section with a comment.
  8. Replies
    8
    Views
    738

    Re: constructor method syntax error

    Thank you

    Newbie here. Sorry if this is silly.

    I am getting 'Not a statement, ; expected error' for the second constructor method below.
    Can't figure the problem.
  9. Replies
    8
    Views
    738

    constructor method syntax error

    Newbie here. Sorry if this is silly.

    I am getting 'Not a statement, ; expected error' for the second constructor method below.
    Can't figure the problem.

    class Knapsack {

    public int...
Results 1 to 9 of 9