Introduction to Java : Building Your First Application part-1
Building an Application
Okay, so now let’s look at the rest of the Test class because the Test class is pretty special. The Test class is actually a very small Java Application that can be compiled and executed!
Here is the code again…
public class Test
{
public static void main(String[] args)
{
Announcer a = new Announcer();
a.printAnnouncement();
}
}
You should already be comfortable with the definition of the class from the last section. You should also be familiar with the contents of the main() method since we just discussed it. But what is the main() method and why is there no constructor for Test?