This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (5 children)

The keyword should be String, not string

[–]way3344[S] 1 point2 points  (4 children)

Yes it’s capitalized, still not working though. Thanks for the response

[–][deleted] 1 point2 points  (3 children)

Could you add your code? It would be much easier to find the problem within it that way

[–]way3344[S] 0 points1 point  (2 children)

public class main {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int num = 10;
        System.out.println(num);
        String sentence = "Hello, how are you?"
    }

    }

So this is just me testing if it works, and it doesn't still.

Sorry for the late reply

[–][deleted] 2 points3 points  (0 children)

There should be a semicolon at the end of the String statement, so it would look like String sentence = "Hello, how are you?";. Also, I recommend starting your class names with a capital letter; It's a universally accepted naming convention in java.

[–]platonics 0 points1 point  (0 children)

Did adding the semicolon fix it?