Computer Program Technology
Friday, 14 September 2012
Java program codes: 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