Write a java program to display a simple string.

Category : Java | Sub Category : The Genesis of Java | By Runner Dev Last updated: 2020-09-27 11:39:57 Viewed : 187


Write a java program to display a simple string.

Description : This is a simple java program in which show a string (" this is a simple program.")

Code:

 / **

 *

 * Write a java program to display a simple string.

 */

class example { // This line declare a class name & the class definition is start from here .

     public static void main(String a[]) { // This line begins the main() method.

         System.out.println(" this is a simple program."); // this line print this is a simple program followed by newline.

 

     } // end of main program

} // end of class




OUTPUT:


Search
Related Articles

Leave a Comment: