How to print a statement without using semicolan in java
Answers were Sorted based on User's Feedback
Answer / sadikhasan palsaniya
for (int i=0;i<1;System.out.println("Sadikhasan
Palsaniya"),i++);
| Is This Answer Correct ? | 22 Yes | 4 No |
Answer / srinivaskumar.nimmana
Write like this to print...
if(system.out.printf("hello sree")==null)
here we r using printf instead of println()
| Is This Answer Correct ? | 25 Yes | 9 No |
Answer / prince kohli
claass WithoutSemicolon
{
public static void main(String args[])
{
if(System.out.printf("hello java")==null)
{}
}
}
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / 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 |
Answer / nagireddy
BufferedWriter bw=new BufferedWriter(new PrintWriter(System.out));
//Scanner scan=new Scanner((Readable) System.out);
bw.write("nagi");
bw.close();
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abhishek sahu
class PrintDemo
{
if(System.out.println("Hello"))
{
}
}
| Is This Answer Correct ? | 2 Yes | 12 No |
What is multithreading and its advantages?
types of applets?.
why we are calling j2se why not j1se or j3se or j4se..etc is there any reason.. can u please explain it... i shocked in my interview when they asked this question please explain ans
what is daemon thread and which method is used to create the daemon thread? : Java thread
Integer.parse Int(bf.readLine(System.out.println("enter value for n["+m+"]:"))); can it run under this
what is difference between String buffer and String builder?
How to obtain a performance profile of java program
How does thread synchronization occurs inside a monitor?
How do you sort in java?
A abstract class extending an abstract class.Super class has both abstract and non-abstract methods.How can we implement abstract and non-abstract mehtods? Explain with snippet
Can we convert stringbuilder to string in java?
What is equals method in java?