Java program codes
Pages
(Move to ...)
Home
▼
Friday, 9 September 2011
java If else demo
class IfDemo
{
public static void main(String args[])
{
int no=Integer.parseInt(args[0]);
if(no>0)
System.out.println("Number is a Positive ");
else if(no<0)
System.out.println("Number is a Negative ");
else
System.out.println("Number is a 0");
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment