Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Give two examples of Operating Systems. 2. Unicode is a world standard to rep

ID: 666952 • Letter: 1

Question

1. Give two examples of Operating Systems.

2. Unicode is a world standard to represent _________________

3. Java is a high-level language.. true or false?

4. Java is an object-oriented language.... true or false?

5. You have successfully compiled the file Hi.java, how do you run the corresponding program from the command line?

a. java Hi.java

b. java Hi.class

c. java Hi

d. Hi.class

6. A double is more precise than a float... true or false?

7. char values are surrounded by _____ quotes

8. String literals are surrounded by _____ quotes

9. The result of 3.0 / 2 is __________

a. 1

b. 1.5

c. 3

d. 2

e. 0

10. If you have written the following source code:

public class SpringBreak{   // lots of code here}

then your source code should be saved in a file named _______________

11. What keyword do we use when instantiating an object _________________

   a. create

b. =

c. new

d. Object

e. is

12. The operations for a class are called _____

13. The special method that we call when instantiating an object is called a _____

14. Write Java statements to instantiate a random number generator object and generate a random integer between 100 and 250 (inclusive).

15. Complete this code in main to perform the requested operations for a date entered by the user in this format: month dd, yyyy

public static void main( String [] args )

{

Scanner scan = new Scanner( System.in );

System.out.print( "Enter a date > " );

String date = scan.nextLine( );

// a. output the first letter in the month

// b. output the date in all lowercase letters

/* c. output the year portion of the date, that is, the characters in the date that follow the comma. For example, if the date is February 24, 2016, you would output 2016. (Note, your code should work for ANY date in that format.) */

Explanation / Answer

1.Windows 10,Mac,Ubuntu

2.Character Encoding

3.true it is a high level language

4.true it is a high level language

5.a

6.true double is more precise

7.single quotes

8.double quotes

9.b

10.SpringBreak same as that of the class name public class

11.new

12.methods

13.constructor

14.import java.util.Random;

15.   Scanner scan = new Scanner( System.in );
   System.out.print( "Enter a date > " );
   String date = scan.nextLine( );
   System.out.println("First Letter of the MOnth:"+date.charAt(0));
   date.toLowerCase();
   System.out.println("date in lower case"+date);
   String[] s=date.split(",");
   System.out.println("Year"+s[1]);