How to print a statement without using semicolan in java

Answer Posted / amit sharma

public static void main(String[] args) {

if(System.out.printf("hi",null) == null)
{
System.out.println("byee");
}
}


In printf(String format, Object args), We also need to
specify argument.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe how to implement singleton design pattern in struts.

537


Define how objects are stored in java?

567


What is a method header?

550


What is static keyword?

594


how we can create packages in java?

523






How do you add an arraylist to an array in java?

511


What is the exception hierarchy in java?

490


What is bytecode in java ?

610


Why is java so important?

654


What is array size in java?

501


What is included in core java?

588


How to make a read-only class in java?

595


Is alive and join method in java?

540


Is it possible to compare various strings with the help of == operator?

550


Why collection doesn’t extend cloneable and serializable interfaces?

649