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. Which one is the inbuilt Abstract class in java
View Tutorial          By: vikas jain at 2013-04-16 07:25:33

2. thank you sir, please provide me string array in d
View Tutorial          By: ravi gupta at 2012-01-17 17:04:33

3. My Friend,

Thank you so much for ex

View Tutorial          By: Bikash at 2010-05-30 00:15:26

4. Finally a tutorial that clearly explains why Hasht
View Tutorial          By: Lisa Ander at 2011-10-27 20:33:15

5. Nice Article, but these concepts are pretty confus
View Tutorial          By: Goldest at 2011-03-18 01:50:50

6. I am still going through the tutorial, but it seem
View Tutorial          By: shadowwraith at 2011-06-08 08:00:57

7. @bibiki, you are right for simpler conditions what
View Tutorial          By: Marcin at 2012-04-05 02:34:13

8. my query is like this: " accept a string, cou
View Tutorial          By: samtopper at 2014-07-31 17:40:25

9. I had just copied the code & tried to execute
View Tutorial          By: dhananjay padalkar at 2010-02-13 19:20:27

10. hi,
while exporting data i am getting error

View Tutorial          By: akash at 2011-12-22 07:28:05