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. Before i had lot of doubts in abstract class... no
View Tutorial          By: Mohandoss at 2012-04-02 05:08:43

2. Hello sir pls send me
com.sun.speech.freet

View Tutorial          By: nikunj at 2011-08-19 06:55:37

3. I really helped with this tutorial.
In case

View Tutorial          By: maya at 2008-07-30 00:35:51

4. Why use recursion in Java, even for Strings? The s
View Tutorial          By: Kristoffer L at 2012-11-21 01:51:36

5. I need code for read write mifare 1k card using No
View Tutorial          By: amarendra at 2010-12-02 21:12:08

6. #include<iostream>
#include<conio.

View Tutorial          By: Zohaib Farooq at 2011-05-23 12:47:54

7. A more complete description of the common pitfalls
View Tutorial          By: Phil at 2012-11-25 02:06:49

8. I want to be programer
View Tutorial          By: somphone at 2015-09-09 11:20:20

9. Thank you very much. This is the easiest and also
View Tutorial          By: Mehmet Üsküp at 2013-06-17 21:08:08

10. How to do the following
Create a class With

View Tutorial          By: Anurag at 2014-01-03 10:14:45