Comment on Tutorial - Nested if in java By aathishankaran



Comment Added by : ishaan gogna

Comment Added at : 2012-05-09 19:00:49

Comment on Tutorial : Nested if in java By aathishankaran
PROGRAM TO FIND OUT SMALLER NU:-

class smaller
{
public static void main(String ss[])
{
int i,j,k;
i=5;
j=45;
k=3;
if((i<j)&&(i<k))
{
System.out.print("smaller="+i);
}
if((j<i)&&(j<k))
{
System.out.print("smaller="+j);
}
if((k<i)&&(k<j))
{
System.out.print("smaller="+k);
}
}
}

OUTPUT:-
Javac smaller.java

java smaller
smaller=3


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. nice intelligent work
View Tutorial          By: santosh at 2010-11-28 01:18:50

2. How to fetch a value from a database in dropdown b
View Tutorial          By: lara at 2014-11-19 09:02:43

3. Hi... it would be good if someone could send the r
View Tutorial          By: deb at 2008-02-20 11:36:51

4. Easy to understand
View Tutorial          By: suji at 2012-02-21 08:28:05

5. The !isset() is basically checking if the string i
View Tutorial          By: Bijan at 2012-09-21 20:49:41

6. Apache was failing to deliver php pages that were
View Tutorial          By: Ted at 2010-11-13 08:13:29

7. what is the use of int getch(void)
and unge

View Tutorial          By: sania at 2014-06-04 17:15:30

8. This program not running on my system so give some
View Tutorial          By: Ajay Kumar Barik at 2009-06-15 02:28:47

9. can you give me tutorial how to copy phonebook to
View Tutorial          By: rico at 2010-04-04 21:07:57

10. Thank you so much. I have migrated from the .NET t
View Tutorial          By: kanika at 2011-05-31 12:23:33