What is wrong with this?? Here are the two classes...SandBox and KittyKitty?? I need to also know what happens if two or more values are equal and if exactly two values are equal, does it matter whether the equal values are lower or higher than the third?? And can somebody please help me answer the questions at the bottom???
//A place to play with your kitty
public class SandBox
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
KittyKitty cat = new KittyKitty();
/////////////////////////////////////////////////////////////
// This is where you put YOUR code to have "cat"
// call ( use ) the methods ( services ,function , procedures)
// YOU have defined ( written ) in the class called KittyKitty
/////////////////////////////////////////////////////////////
int able = 10;
int cdef = 5;
String ghi = "good";
cat.myMethod_1(able, cdef, ghi);
}//End main()
}//End class definition
__________________________________________________ ________________
public class KittyKitty {
{
/////////////////////////////////////////////////////////////
// Here is where you will write ( define ) the methods of
// this class
/////////////////////////////////////////////////////////////
public KittyKitty()
{
}//End constuctor
void myMethod_1( int able, int cdef, String ghi)
{
if( able < cdef)
{
System.out.println("The answer is=" + ghi);
}// End if
System.out.println("The answer is not=" + ghi);
}//End myMethod_1()
}//End class definition
__________________________________________________ ________________
What is wrong with this and how do I rewrite it to produce the correct output??
if (total == MAX)
if (total < sum)
System.out.println ("total == MAX and is < sum.");
else
System.out.println ("total is not equal to MAX");
__________________________________________________ ________________
Whats wrong with this and will it compile if it is part of an otherwise valid program? I'm supposed to explain
if (length = MIN_LENGTH)
System.out.println ("The length is minimal.");