This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 23
October 13, 1997
#1. Write code that will swap the values (already assigned) in integer variables a and b ( 5 points ).
#2 What value will be returned by the function primeNumbers below when num contains 4? ( 5 points )
public static boolean primeNumbers ( int num )
{
boolean result;
int begin = 2;
if ( num > begin )
{
while ( begin < num )
{
if (( num % begin ) == 0 )
{
}
else
{
}
begin ++;
}
}
return result;
}