Displaying Text with printf - Java Language Basics

Java examples for Language Basics:Hello World

Description

Displaying Text with printf

Demo Code

public class Main 
{
   public static void main(String[] args)
   {//  w  w  w .  j ava  2 s .  com
      System.out.printf("%s%n%s%n",          
         "Welcome to", "Java Programming!");
   } 
}

Result


Related Tutorials