Lab Quiz lesson 1

  1. Lab Quiz for Lesson 1Due:June 14Include all answers on a seperate .doc file clearly labeled with your name, date, course # andeach seperate answer clearly labeled.______________________________________________________________________________________89101112131415161718192021221. What will the following code produce? Feel free to run program in NetBeans.package JavaTutorials;public class BooleanTestExercise {public static void main(String[] args) {//Use the boolean keyword to declare boolean variable boolean testResult;//Initialize the boolean variable with value true or false, once boolean declaration is donetestResult = true;//Print the value of boolean variableSystem.out.println(“Test Result is: ” + testResult);//Change the value of boolean variabletestResult = false;//Print the value of boolean variableSystem.out.println(“Test Result is: ” + testResult); }}2. Write a Java program to print the following output:++++++@@@@@@******######3. Write a Java program to declare three variable a, b, & c and store the values respectively 10, 20.3 & 3.14785 . Then display their values on the screen.4. What is the purpose of System.out.println() method ?OptionsA – Receive data from keyboard in a console program.B – Display output on the Console.5. Find the errors in the below program:12345 public static void main(String[] args) { valueInt int = 18; valueDob double = 10.10; valueBool boolean = true; }

ABP
h
dcccd.blackboard.com
+
Lab Quiz for Lesson 1
Due: June 14
Include all answers on a seperate .doc file clearly labeled with your name, date, course # and
each seperate answer clearly labeled.
8
9
10
1. What will the following code produce? Feel free to run program in NetBeans.
package Java Tutorials;
11
12
13
public class BooleanTestExercise {
14
15
public static void main(String[] args) {
//Use the boolean keyword to declare boolean variable
boolean testResult;
16
17
18
19
//Initialize the boolean variable with value true or false, once boolean
declaration is done
20
testResult =
true;
21
22
// Print the value of boolean variable
System.out.println(“Test Result is:
+
testResult);
//Change the value of boolean variable
testResult = false;
//Print the value of boolean variable
System.out.println(“Test Result is:
}
+
testResult);
}
2. Write a Java program to print the following output:
++++++
When finished, make sure to click Submit.
Optionally, click Save as Draft to save changes and continue working later, or click Cancel to quit without saving changes.
Cancel
Save Draft
Submit
ABP
h
dcccd.blackboard.com
+
2. Write a Java program to print the following output:
++++++
@@@@@
******
######
3. Write a Java program to declare three variable a, b, & c and store the values respectively 10, 20.3 & 3.14785. Then display their
values on the screen.
4. What is the purpose of System.out.println() method ?
Options
A – Receive data from keyboard in a console program.
B – Display output on the Console.
5. Find the errors in the below program:
Ол да ме
public static void main(String[] args) {
valueInt int
= 18;
valueDob double = 10.10;
valueBool boolean
=
true;
}
ASSIGNMENT SUBMISSION
When finished, make sure to click Submit.
Optionally, click Save as Draft to save changes and continue working later, or click Cancel to quit without saving changes.
Cancel
Save Draft
Submit

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER