Mega Code Archive

 
Categories / Java Tutorial / Language
 

Shows the proper way to declare a class variable named helloMessage

public class MainClass {     static String helloMessage;     public static void main(String[] args)     {         helloMessage = "Hello, World!";         System.out.println(helloMessage);     } }