먼저 이클립스 자바로 시도.
public class OnePlusOne {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
1+1=?
}
}
결과는
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The left-hand side of an assignment must be a variable
Syntax error on token "+", invalid AssignmentOperator
Syntax error, insert ";" to complete BlockStatements
at OnePlusOne.main(OnePlusOne.java:10)
다음으로..
System.out.print(1+1=?); 로 해봄
결과는
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token(s), misplaced construct(s)
The left-hand side of an assignment must be a variable
Syntax error on token "?", invalid Expression
at OnePlusOne.main(OnePlusOne.java:10)
ㅇㅇ
댓글 0