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


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.