Menu
support@authoritypapers.com
+1(805) 568 7317

find all the errors in each of the following javastatements and explain how you coul 5122650

Find all the errors in each of the following Javastatements, and explain how you could x

them. The amount of errors is an approximation and depends on howyou x them. (c) (5 errors)

class FixMePlease

{

Scanner getInput;

int x;

double y;

char z;

String s;

public void askUserForInput()

{

System.out.println(“Enter an integer:”);

x = getInput.nextInt();

System.out.println(“Enter a decimal:”);

y = getInput.nextDouble();

System.out.println(“Enter a character:”);

z = getInput.nextChar();

System.out.println(“Enter a String:”);

s = getInput.nextString();

}

} (d) (6 errors)

class such-a-mess

{

public numberProperties(int x)

{

if (x%2 = 0)

System.out.println( The number x is even. );

if (x

System.out.println( The number x is less than 10. );

}

} (e) (5 errors)

class needsHelp

{

if (x > = 5)

System.out.println(x + ” is greater than or equal to 5.”)

else (x

System.out.println(x + ” is less than 5.”)

} write a Java class that will accomplish the given tasks.You

do not need to include comments. (f) Write two versions of a class named Answer6 that contains amethod named largeTripleNumber

that takes as its parameters an integer x, and prints “Yes” when xis an even number larger

than 337, and prints “No” otherwise. In one version, use an if …else statement. In the

other version, do not use the else statement. . . .

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now