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. Thanks this page is very useful for me and now I k
View Tutorial          By: Yee Wai Wyne at 2009-10-18 23:03:41

2. thanks for this sample.. it possible to handle the
View Tutorial          By: nel at 2011-06-13 22:59:45

3. Currently am working in Perl, lik to learn Java, n
View Tutorial          By: KUMARESAN at 2011-12-14 05:08:47

4. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: vijay at 2013-12-03 07:32:38

5. Hi..All ...to run this programs.first of of all u
View Tutorial          By: raavi.surendra at 2011-12-29 05:34:06

6. Thanks, very helpful. Worked perfectly.
View Tutorial          By: Bob Knob at 2011-07-27 18:22:18

7. hi i have doubt in strlen()........pls explain how
View Tutorial          By: ranjith at 2010-04-18 21:50:17

8. i am new to java plz give any sample and simple ja
View Tutorial          By: sham at 2012-03-20 02:30:20

9. good resource
View Tutorial          By: AJITH C K at 2013-04-10 17:45:51

10. How to use Shift operators with practicals in java
View Tutorial          By: RosyKrish at 2013-01-17 02:42:37