Home » Java programs

Java program to print message without using semicolon

In this java program, we are going to learn how to print any message without using semicolon?
Submitted by IncludeHelp, on October 28, 2017

We have to write a program in java that will print the message without using semicolon.

Consider the program,
In this program, we are using System.out.printf() method within the if statement instead of condition section.

public class PrintWithoutSemicolon 
{
  public static void main(String[] args)
  {  // this condition is for printing the message without using semicolon
	 if(System.out.printf("This is Printing Program Without Semicolon")== null)
	 {
		 
	 }	  
  }
}

Output

This is Printing Program Without Semicolon




Was this page helpful? YES NO

Are you a blogger? Join our Blogging forum.



Comments and Discussions


We are using Google to publish ads on our website; Google has its own privacy policies. They may save log, cookies on your system. Google may also collect information of your system like IP address, region, city, country. For more details please go through the Google’s privacy policy.