0% found this document useful (0 votes)
11 views2 pages

Java If Statement Example Code

The document contains a practical assignment by Drushti Shinde from Batch C2, Roll No 22151. It includes a Java code snippet demonstrating an if statement that checks if a variable 'a' is greater than 20, and prints a message if true. The output of the code is not explicitly stated but implies that 'a is greater' would be printed.

Uploaded by

sachin1sms890
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Java If Statement Example Code

The document contains a practical assignment by Drushti Shinde from Batch C2, Roll No 22151. It includes a Java code snippet demonstrating an if statement that checks if a variable 'a' is greater than 20, and prints a message if true. The output of the code is not explicitly stated but implies that 'a is greater' would be printed.

Uploaded by

sachin1sms890
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name:-Drushti Shinde

Batch:-C2
Roll No:-22151
Practical 3

Q. Ifdemo

Code:-
public class Ifdemo {
public static void main(String[] args){
int a=25;

if (a>20){

[Link]("a is greater");
}
}
}
Output:-
Name:-Drushti Shinde
Batch:-C2
Roll No:-22151

You might also like