intermediate/GreetTest

From ggc

Jump to: navigation, search

01 package intermediate;
02 
03 import wiki.Wiki;
04 import java.util.*;
05 
06 /**
07  * All about my application.
08  @author My Name Here
09  */
10 public class GreetTest
11 {
12   public static void main(String[] args)
13   {
14     GreeterInterface[] all={
15                                new NiceGreeter(),
16                                new MeanGreeter(),
17                                new OtherGreeter()
18                            };
19     Random random=new Random();
20     int index=random.nextInt(all.length);
21     Wiki.out.println(all[index].getGreeting());
22   }
23 }

Compiler Errors:
----------
1. ERROR in intermediate/OtherGreeter.java (at line 13)
	return "Hello."
	       ^^^^^^^^
Syntax error, insert ";" to complete BlockStatements
----------
2. ERROR in intermediate/OtherGreeter.java (at line 16)
	}
	^
Syntax error, insert "}" to complete ClassBody
----------
2 problems (2 errors)

Download/View intermediate/GreetTest.java




Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter