Java program codes
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment