Skip to content

Instantly share code, notes, and snippets.

@karan-ta
Created November 9, 2016 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karan-ta/f41f811eaeb82b1b4140db839407852b to your computer and use it in GitHub Desktop.
Save karan-ta/f41f811eaeb82b1b4140db839407852b to your computer and use it in GitHub Desktop.
public class Lesson1neeraj{
//instance method
private void sayHello(String name){
System.out.println("Hello "+name);
}
public static void main(String[] args){
System.out.println("Hello World");
System.out.println("Hello "+args[0]);// array index out of bounds exception
Lesson1neeraj lesson = new Lesson1neeraj();//creating instance/object
lesson.sayHello(args[0]);
//any questions ??
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment