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



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. It takes me time to understand the process of the
View Tutorial          By: Abdullah Ibrahim at 2012-04-11 00:38:23

2. Thanks for the post !
View Tutorial          By: percy at 2011-11-24 08:56:23

3. Thanks..
It is so easy to understand...

View Tutorial          By: Rahul Meshram at 2008-09-11 13:18:41

4. I'm trying to follow this backward, but I can't fi
View Tutorial          By: DMM at 2014-03-14 21:42:06

5. Hi,
this is excellent stuff and I highly ap

View Tutorial          By: Nanda at 2007-11-02 04:58:30

6. Sir,
i am implementing the above code in w

View Tutorial          By: Girish padki at 2010-01-15 21:50:50

7. nice 1
View Tutorial          By: vivek at 2013-03-19 16:25:47

8. introduction is very clear i get wat answer i want
View Tutorial          By: kalyan at 2013-07-02 09:23:40

9. hai vij i am also having error what sol u used to
View Tutorial          By: uma at 2008-05-30 01:05:39

10. This works perfect for me. The only big problem is
View Tutorial          By: Eric at 2014-11-20 03:49:19