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. Help Me

I just run the ListPorts.ja

View Tutorial          By: srinivas at 2009-04-06 03:14:57

2. Nice Example...!
View Tutorial          By: Kuldeep Singh at 2009-10-18 23:58:17

3. Hi, I don't have any GSM modem. Will it work if I
View Tutorial          By: Arif at 2008-10-09 11:29:14

4. Thanks for the Topic. But there are many more comp
View Tutorial          By: Uditha Madumal at 2010-09-15 19:39:13

5. Would be great if you also showed how to manipulat
View Tutorial          By: Sparx at 2010-01-05 13:51:56

6. well an easy code to understand
thanks muc

View Tutorial          By: narmada at 2011-01-17 09:47:02

7. EXACTLY COPIED BY "C PROGRAMMING" by DEN
View Tutorial          By: Aashish at 2012-06-06 17:56:36

8. hi ..........
the code is worked for me....

View Tutorial          By: pradeep at 2012-01-25 06:30:14

9. Hi, you put a semicolon after "int main()&quo
View Tutorial          By: noel4037 at 2009-12-28 06:40:17

10. Muchas gracias por compartir informacion. :)
View Tutorial          By: Anonymous at 2009-05-21 08:48:47