Sunday, 5 November 2017

java important theory problems



Question 04:
What is Boolean data type.
Ans:
The result of this data type is either true or false based on the following condition.
Question 05:
What is an if statement also write it syntax.
Ans:
It compare two values if the result is true then if statement is execute .
If(9==9)
System.out.println(“JAVA”);
Question 06:
Write an if statement that assigns 1 to x if y is greater than 0.
Ans:
   If (y>0)
X=1;

No comments:

Post a Comment