Welcome Guest | Sign in | Register
Final and Datatypes - Discussion Page For Q.2750 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Final and Datatypes > Questions and Answers

Q: Class w{
Public static void main(String agrs[]){
System.out.println(“hello”);
}

Public static void main(String agrs[]){
System.out.println(“hello”);
}

}
A. hello B. compile time error
C. runtime error D. none of the above

Answer and Explanation

Answer:compile time error

Explanation:
Duplicate main() method. In a single class we cant have two main() methods..

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved 2012-2015 SoftLucent.