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 |
How to make class immutable
Can we call a non-static method from inside a static method?
printstream class method println() is calling using System class and its static object out .how it is explain any one in detail with example ?
What do you understand by looping in java? Explain the different types of loops.
In Java, what are this() and super(), and where are you required to use them?
Write a program to find the greatest of three numbers in java?
Can we change the value of static variable?
Write a program to search a number in the given list of numbers.
write a progam hashmap & hashtable?
How can an object be unreferenced?
For class CFoo { }; what default methods will the compiler generate for you>?
What is a nested structure?