Answer the following questions as briefly (but completely) as possible:
public class Welcome {
public void Main(String[] args) {
System.out.println('Welcome to Java!);
}
)
NoClassDefFoundError occurs when you attempt to run
a Java program, what is the cause of the error? System class need to be imported? Applet, applet, a++, --a, 4#R, $4, #44, apps class, public,
int, x, y, radius int constant named SIZE
with the value 20? int a=1” and
“double d=1.0”, and that each expression is
independent of the others.
What are the results of the following expressions (that is, the resulting
value of a or d)?
a = 46 / 9;
a = 46 % 9 + 4 * 4 - 2;
a = 45 + 43 % 5 * (23 * 3 % 2);
a %= 3 / a + 3;
d = 4 + d * d + 4;
d += 1.5 * 3 + (++a);
d -= 1.5 * 3 + a++;
System.out.println("25 / 4 is " + 25 / 4); System.out.println("25 / 4.0 is " + 25 / 4.0); System.out.println("3 * 2 / 4 is " + 3 * 2 / 4 ); System.out.println("3.0 * 2 / 4 is " + 3.0 * 2 / 4);
4 3 + d(2 +a)
------- - 9(a+bc) + -----------
3(r+34) a+bd
System.out.printf("%5d %d", 1, 2, 3); System.out.printf("%5d %f" , 1); System.out.printf("%5d %f" , 1, 2); System.out.printf("amount is %f %e\n" , 32.32, 32.32); System.out.printf("amount is %5.4f %5.4e\n", 32.32, 32.32); System.out.printf("%6b\n", (1>2)); System.out.printf("%6s\n", "Java"); System.out.printf("%-6b%s\n", (1>2), "Java"); System.out.printf("%6b%-s\n", (1>2), "Java"); System.out.printf("%6b%-8s\n", (1>2), "Java"); Email your homework assignment, by copy-and-paste (no attachments please, to (homework submission). If possible use the “text” and not the “HTML” mode of your email program. Please use the subject similar to “Java Programming I Homework Assignment #1 Submission”, so I can tell which emails are submitted homework assignments.
Homework assignments will not be returned. Please do not send as attachments. Refer to the Homework and the Submitting Assignments sections of your syllabus for more information.
Confused? Send questions about the homework assignment to (homework questions). Please use a subject similar to “Java Programming I Homework Assignment #1 Questions” so I can tell which emails are questions about assignment quiz (and not submissions).