QUOTE(horace @ 19 Mar, 2007 - 12:05 AM)

in
CODE
boolean x=10;
you declare of boolean x and assign an int to it?
CODE
boolean = ((x<100) &&(x>1)) ||(x<0);
you decare the type boolean but no variable ?
why don't you write a program and see if you fix it?
the other look like questions from a test - what do you think the answers are?
public class numOne
{
public static void main(String[] args)
{
int x=10;
if((x<100) &&(x>1) || (x<0))
System.out.println (x);
else
System.out.println(" out of range ");
}
}
QUOTE(ravipamuru @ 19 Mar, 2007 - 01:51 AM)

QUOTE(horace @ 19 Mar, 2007 - 12:05 AM)

in
CODE
boolean x=10;
you declare of boolean x and assign an int to it?
CODE
boolean = ((x<100) &&(x>1)) ||(x<0);
you decare the type boolean but no variable ?
why don't you write a program and see if you fix it?
the other look like questions from a test - what do you think the answers are?
public class numOne
{
public static void main(String[] args)
{
int x=10;
if((x<100) &&(x>1) || (x<0))
System.out.println (x);
else
System.out.println(" out of range ");
}
}