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. I want to parse a xml content some think like bel
View Tutorial          By: sagar at 2011-04-20 00:59:06

2. Hi,
What should be done to correct the erro

View Tutorial          By: Raymond at 2011-03-07 08:51:54

3. Please resolve this problems :

ja

View Tutorial          By: madhusudhakar at 2014-10-24 06:11:10

4. thank you...
View Tutorial          By: Rojan at 2011-07-04 01:51:45

5. hi,
my problem is.......
i use vb.ne

View Tutorial          By: Anirban at 2009-10-25 10:15:13

6. hi RAMLAK i am akankshain and getting these erro
View Tutorial          By: akanksha at 2011-12-06 10:15:47

7. site is very good explanation is very clear throug
View Tutorial          By: sridevi at 2013-03-20 15:26:29

8. Thank you very much for such a nice topic
View Tutorial          By: CHANDAN at 2012-11-01 04:40:02

9. @pawan: Wow. Your comment is museum-quality art, a
View Tutorial          By: Steve at 2013-02-21 20:30:47

10. Can we use the if sttmt l;ike this::
if (a

View Tutorial          By: Anubhav at 2010-11-14 08:15:04