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. Small modification.
System.out.println(&qu

View Tutorial          By: Rohit at 2012-02-07 16:22:52

2. thank for this script
because i will work

View Tutorial          By: r at 2009-06-27 05:07:31

3. hi, how do i turn it into a gui with swing allowin
View Tutorial          By: psychicjava at 2011-02-06 13:18:08

4. I an going to try this code.
View Tutorial          By: Bhagawati Prasad at 2010-02-06 02:45:10

5. if the "extend" word is not present does
View Tutorial          By: detteskii at 2011-06-27 09:12:23

6. Good start for me. At least I now know what i am s
View Tutorial          By: eoaddai at 2011-12-23 20:53:35

7. The example shown and ur way of explaining is good
View Tutorial          By: Devi at 2009-02-24 07:19:26

8. Can you give some examples of do while & pleas
View Tutorial          By: mhilan at 2011-09-01 04:54:13

9. i wrote ocjp exam on oct 27,2012. But still i didn
View Tutorial          By: Yashwinkkumar R at 2013-02-17 09:05:29

10. I HAVE ONE DOUBT.

public class Anim

View Tutorial          By: georgy at 2009-10-22 02:46:10