















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Error:Exception in thread main: No classDeffound error
๏ Public static void display() ๏ { System.out.println(โHelloWorldโ); ๏ }
๏ Public static void display() ๏ { System.out.println(โHelloWorldโ); ๏ } ๏ No main method in file
Exception in thread main: No such method error
๏ Public static void main(String [] args) ๏ { ๏ Int number; System.out.println(number1); ๏ }
๏ Public static void main(String [] args) ๏ { ๏ Int number; System.out.println(number); ๏ } ๏ //value has not been assigned to โnumberโ
๏ Public static void main(String [] args) ๏ { ๏ Int number=10; System.out.println(number); ๏ } ๏ //value has not been assigned to โnumberโ
๏ Public static void main(String [] args) ๏ { System.out.println(args[0]); ๏ } ๏ //args array can only be accessed if command line arguments are provided
๏ Public static void main(String [] args) ๏ { ๏ String s=โ20sโ; ๏ Int number=Integer.parseInt(s); }
๏ Public static void main(String [] args) ๏ { ๏ String s=โ20โ; ๏ Int number=Integer.parseInt(s); } //this program will be executed now
๏ Public static void main(String [] args) ๏ { ๏ Student s=null; ๏ System.out.println(s); }