Skip to main content

up to date?

1 reply [Last post]
Joined: 2007-11-20

i been learning java lately and got the latest version link from a freind and im now unsure if it is at all. the books and videos i have been reading/watching to learn from use:
Public static void main(String[] args)

but i get a error and have to change it to:
public static void main (String args[])

it works fine after changing it but im wondering if its because the videos are old and it got depreciated or whatever or if im behind and need to get yet another version of JDK


and it also tells me when i got a line like this:
} eles {
is not a statement

} eles {
";" expected

all the java i seen i never seen "} eles; {" work before.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-12-18

Java is [i]case-sensitive[/i], meaning that capitalisation matters. "Public" is not the same as "public", never has been and likely never will be.

You may have better luck using [b]else[/b] rather than [b]eles[/b].

[code]if (booleanValue) {
// Do this
} else {
// Do that

Sun's own [url=]Java Tutorial[/url] is a decent place to learn the first steps. Also, consider posting in the [url=]Java fora for beginners[/url].