Whats wrong with my simple program?! (exception in thread main at greeting 1.main)?

public class Greeting1 { public static void main(String[] args) { String firstName = args[0] ; String lastName = args [1] ; System.out.println("Hello, " + firstName + " " + lastName); System.out.println ("Congratulations on your second program!") ; what should... show more public class Greeting1
{
public static void main(String[] args)
{
String firstName = args[0] ;
String lastName = args [1] ;
System.out.println("Hello, " + firstName + " " + lastName);
System.out.println ("Congratulations on your second program!") ;

what should i do to fix the problem. Can't understand why this is doing this. do I have to define variables or something weird? please help
2 answers 2