Conditionals Test
 
1. num = 5;
if(num>=5)
{
     System.out.println("Java Rules!");
}
System.out.println("Done.");

 

 

 

2. num = 3;
if(num>=5)
{
    System.out.println("Java Rules!");
}
System.out.println("Done.");

 

 

 

3. num=5;
if(num<=5)
{
    System.out.println("Java Rules!");
    System.out.println("Done.");
}

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

2. num = 3;
if(num>=5)
{
    System.out.println("Java Rules!");
}
System.out.println("Done.");

 

 

 

3. num=5;
if(num<=5)
{
    System.out.println("Java Rules!");
    System.out.println("Done.");
}

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

2. num = 3;
if(num>=5)
{
    System.out.println("Java Rules!");
}
System.out.println("Done.");

 

 

 

3. num=5;
if(num<=5)
{
    System.out.println("Java Rules!");
    System.out.println("Done.");
}

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

3. num=5;
if(num<=5)
{
    System.out.println("Java Rules!");
    System.out.println("Done.");
}

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

3. num=5;
if(num<=5)
{
    System.out.println("Java Rules!");
    System.out.println("Done.");
}

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

4. num=5;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.print("Done.");
}
System.out.println("ABC");

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
determine whether the following statements are TRUE or FALSE:

a)  a = = b
b)  b != d
c)  c <= b
d)  a < c
e)  a = = d
f)  c > a  
g)  a >= c 

 

 

 

5. num=9;
if(num<=5)
{
     System.out.println("Java Rules!");
     System.out.println("Done.");
}
System.out.println("Howdy");

 

 

 

6. if(true)
     System.out.print("10");
System.out.print("20");
if(false)
     System.out.print("30");
System.out.print("40");

 

 

 

7.  if(false)
{
     System.out.print("This is ");
     System.out.print("never printed.";
}

 

 

 

8. if(false)
    System.out.print("This is ");
System.out.println("never printed.");

 

 

 

9. Given the following information:
int a = 1;
int b = 2;
int c = 3;
int d = 1;
det