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. basic example on serialization... its good and cle
View Tutorial          By: Rag at 2012-01-08 02:53:41

2. Good programs example need for me
View Tutorial          By: G.Venugopal at 2009-11-11 08:46:38

3. Copy the javax.comm.properties into your $JAVA_HOM
View Tutorial          By: sophie at 2009-03-11 08:23:25

4. class loop8
{
public static voi

View Tutorial          By: ankush singh at 2011-11-04 16:26:36

5. how to display image on gridview from mysql databa
View Tutorial          By: chirag at 2013-03-18 08:12:46

6. HI Friends,

I am new to java and i

View Tutorial          By: Srini at 2015-04-05 17:00:58

7. Thanks and easy to understand.....impressive logic
View Tutorial          By: Dj at 2009-11-26 13:33:34

8. Hi Sir,
Thank You so much for your

View Tutorial          By: kareena at 2010-10-21 23:26:37

9. nice tutorial with discussion
View Tutorial          By: Md Firoz at 2012-01-07 11:00:29

10. Incomplete article; Singleton session bean? And re
View Tutorial          By: vaibhav sakpal at 2013-08-29 07:35:37