Unit 2 Test
Unit 2 Test
ICS
Unit 2 Test
Mark 40/48 T/I 11/12 App 11/12 C 12/12 K/U 6/12
83%
Mark TRUE or FALSE: Determine if each of the following are True or False
1T/I 1. Java applications can run only on the Windows platform.
∙ True
∙ False
Source code is code written by the user and byte code is code compiled by
the computer into number easter and faster for the computer to use.
2A 22. Explain the difference between the print() and println() methods.
Print puts the cursor behind the line and printIn puts the cursor on the
next line
2Comm 23. Write a declaration that declares a class named AverageScore that
is available to any code.
5Comm 24. Write an appropriate comment block for the beginning of a program
to describe an application that is intended to calculate test averages.
/*
*TestAvg.java
*calculates test averages
*ben
*ICS3U
*9/28/2020
*/
7K/U 26. The following application has seven syntax errors. What are they?
6 /*
*Test.java
*What's wrong application.
*Student Name
*ICS3U
*Date
*/
package test;
public class Test
{
public static void main(string[] args) //S
{
System.out.print("Testing …” );
}
2K/U 27. The java.util package contains a class named ArrayList. Write a
statement that makes the ArrayList class accessible to an
application.