Monday 18 December 2017

Can we compile and execute a java program without a class??

Ans: Yes, we can compile and execute without a class. Let’s see the following code:

Test43.java
enum Test43{
;  
public static void main(String[] args)
{
System.out.println("Silan Technology");
}

}

Output
Silan Technology

No comments:

Post a Comment