Question #1 What does the following produce? IdentifyMyParts a = new IdentifyMyP
ID: 3560885 • Letter: Q
Question
Question #1
What does the following produce?
IdentifyMyParts a = new IdentifyMyParts();
IdentifyMyParts b = new IdentifyMyParts();
a.y = 5;
b.y = 6;
a.x = 1;
b.x = 2;
System.out.println("a.y = " + a.y);
System.out.println("b.y = " + b.y);
System.out.println("a.x = " + a.x);
System.out.println("b.x = " + b.x);
System.out.println("IdentifyMyParts.x = " +
IdentifyMyParts.x);
Answer below here
Question #2
The following code creates one array and one string object. How many references to those objects exist after the code executes?
Answer below here
Question #3
The main method is not necessary for all java applications?
Question #4
CONCAT the following variables: Customer, Product and Price and assign any value to each variable using System.out.println()
Question #5
Write a Java program to declare a variable to store the age of a person. Then the output of the program is as an example shown below:
You are 20 years old.
Answer below here
Question #6
The code throws IOException, gives the program a way to acknowledge and handle potential input or output errors and still compile correctly
Question #7
Accepts input data from the keyboard buffer, wrapped in the InputStreamReader(ISR)?
Question #8
Sends output to the display or redirects output to a designated file?
Question #9
Sends output to the monitor; used for prompts and error messages?
Question #10
System.in refers to a buffered input stream?
Question #11
System.out sends a stream to the standard output device which usually is the monitor?
Question #12
The ______________contains several classes used to receive input typed by the user.
Question #13
A class that reads text from a character input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.
Question #14
Which one of the following are primitive data types? (Choose as many)
Question #15
The M_____________class is a part of the java language package, contains methods for a number of useful functions, such as rounding, exponentiations, randomizing, and square roots.
Question #16
J_________________is a class used to display standard dialog boxes; the class provides several methods to create and display dialog boxes that prompt users for an input value, that prompt users to confirm an action, or that display messages.
Question #17
The A_______________is a listener interface that listens for any events that occur during execution of the program, such as when a user clicks a button, double clicks an item, selects a menu item, or presses the enter key.
Question #18
To C __________________ means to bind two or more characters
Question #19
The Scanner keyword is used to input data using the method System.out?
Question #20
The System.out is used to display data to the monitor?
Question #21
The word (for) is used as a FOR LOOP?
Question #22
The Input Stream is used to get the data from the Buffer and pass it to the Input Stream?
Question #23
Which driver is the standard to connect java application to databases?
Question #24
The __________________________ is a class used for writing character files?
Question #25
The _______________________ class is used to write text to a character-output stream?
Question #26
Which command is used to listen for events?
ClickListener
Explanation / Answer
1)
a.y=5
b.y=6
a.x=1
b.x=2
IdentifyMyParts.x=#garbage value
2)
1(only the refernce array object)
3)
false
4) System.out.println("customer=john"+"product=soap"+"price=23");
5)
int a=20;
System.out.println("You are "+a+" years old");
6) true
7) System.in
8) System.out
9) System.err
10) true
11) true
12) Input Stream Reader
13) BufferedReader
14) boolean char double
15)Math
16) JOptionPane
17)action listener
18)Concat
19)false
20)true
21)true
22)false
23)JDBC
24)FileWriter
25)FileWriter
26)ActionListener