java - Not a statement requiring while and other errors -


public class test {     public static void main(string[] args) {         nata = new nata();      }  } 

makes lot of errors

c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:4: error: not statement nata = new nata(); c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:4: error: ';' expected nata = new nata(); c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:4: error: illegal start of expression nata = new nata(); c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:4: error: while expected nata = new nata(); c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:8: error: illegal start of expression } c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:8: error: reached end of file while parsing } c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\src\penkiasdesimtmuzikosatspalviu\test.java:9: error: reached end of file while parsing 7 errors c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\nbproject\build-impl.xml:929: following error occurred while executing line: c:\users\irmantas\documents\netbeansprojects\penkiasdesimtmuzikosatspalviu\nbproject\build-impl.xml:269: compile failed; see compiler error output details.

where problem?

do keyword in java (used in do-while loops); cannot used variable name.

replace else:

public class test {     public static void main(string[] args) {         nata nata = new nata();     } } 

provided nata visible class, work.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -