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. pls give me code for exact communication between
View Tutorial          By: SIRAJ at 2009-02-19 06:24:10

2. hi,.. i have used this code to sending sms. It see
View Tutorial          By: dana at 2008-08-05 03:38:48

3. its easy to understand the complete history of jav
View Tutorial          By: Arun Tony at 2011-04-10 07:12:04

4. Barely can understand it even I'm a NEWBIES ^^
View Tutorial          By: YieonChee at 2012-11-28 17:56:24

5. Great stuff - helped me setting up the company SQL
View Tutorial          By: JW at 2011-07-11 12:09:19

6. import java.io.*;
class lastindexof

View Tutorial          By: arya at 2012-11-07 08:37:59

7. This is the solution that I also used, however, th
View Tutorial          By: Rob Ingenthron at 2012-07-18 23:06:18

8. thanks - this really helped!!
View Tutorial          By: mike at 2012-06-14 19:45:17

9. Nice one , Compailed no Errors ... but when execut
View Tutorial          By: Diamant at 2012-12-04 00:17:11

10. can you plase give an exmple of what should i put
View Tutorial          By: Or at 2013-02-16 11:32:17