HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE
PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?
Answer / jay harkhani
class WhileLoop
{
public static void main(String args[])
{
int i=1;
while(i!=4)
{
System.out.println("NO");
i++;
}
}
}
Is This Answer Correct ? | 5 Yes | 10 No |
Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
What is the use of static methods?
What is java’s garbage collected heap?
What are the files generated after using IDL to java compiler?
What is the difference between sop and work instruction?
Suppose i have two threads t1 and t2 are running.How the main thread will know that the two threads t1,t2 execution has completed?
What is file class and what is its purpose?
Why pointers are not used in java?
Explain throw keyword in java?
What is the function of log?
I have one Shopping cart application, i that i have selected some items, while clicking submit button by mistake i have clicked twice or trice, that time items are selected twice or trice. Actually i want only one copy of items but its selected twice or trice. So how can we avoid this problem?
Explain in detail about encapsulation with an example?