Question 1 (1 point)
What is the file extension for Java executable files?
Question 1 options:
a |
.class |
b |
.dll |
c |
.exe |
d |
.jvm |
Question 2 (1 point)
Which of the choices is a Java statement that declares the Boolean (logical) variable b and initializes it to true?
Question 2 options:
a |
bool b = true; |
b |
bool b = True; |
c |
boolean b = true; |
d |
booeanl b = True; |
Question 1 (1 point) What is the file extension for Java executable files? Question 1 options:...
Q11: Java source files should be stored in text files with java extension. Also, name of the file must match with the class name in the file. What is the name of the compiled version of the source file Monster.java ? a. Monster.java b. Monster.bytecode c. Monster.class d. Monster.compiled
Question 9 (1 point) Individuals may obtain an automatic extension of four months to file their tax returns. 1) True 2) False
Java Questions A class must implement at least one interface. Question 1 options: True False Question 2 (1 point) Abstract methods can be called. Question 2 options: True False Question 3 (1 point) Constructors Question 3 options: Are inherited but cannot be accessed Are inherited and can be accessed Are accessible but are not inherited Are not inherited and cannot be accessed Question 4 (1 point) We can instantiate an object from an abstract class. Question 4 options: True False...
Question 4 (1 point) Translate this Python statement to Java: print(n, end=' ') Question 4 options: a. System.out.print(n) b. System.out.print(n + " "); c. System.out.println(n); d. System.println(n + " "); Question 5 (1 point) What is the output of this code fragment? int count = 0; for(int n = 3; n <= 10; n += 2) { count++; } System.out.println(count); Question 5 options: a. 2 b. 3 c. 4 d. 10
Question: Hands-On Project 3-3 Use a Batch File A file with a bat file extension is called a batch file. Yo... Use a Batch File A file with a .bat file extension is called a batch file. You can use a batch file to execute a group of commands, sometimes called a script, from a command prompt. Do the following to learn to use a batch file: 1. Using a command prompt window, copy the files in your Documents folder...
this is java 4. (2 point each) What value will be assigned to the "answer" variable below? If the expression will not compile in Java, explain why. Write your answer on the line to the right. a. boolean answer = 6 < 2 || 7 > 3; b. boolean answer = true && false; c. boolean answer = ! (87 == 80); d. boolean answer = true > false; e. String name = "Daniel" ; boolean answer = ! (name.equals("Charles"));...
Quiz Question 1 (1 point) Saved The maximum value for an int is: Question 1 options: 2147483647 65535 32767 9223372036854775804 Question 2 (1 point) A float has ____ decimal places of accuracy. Question 2 options: 15 none 7 3 Question 3 (1 point) It is a good practice to compare floats and doubles with ==. Question 3 options: True False Question 4 (1 point) Strings are reference data types. Question 4 options: True False Question 5 (1 point) Value data...
What will be the output of the following Java code? class Output { public static void main(String args[]) { boolean a = true; boolean b = false; boolean c = a ^ b; System.out.println(!c); } } a) 0 b) 1 c) false d) true
In java Objectives: In this lab, the following topics will be covered: 1. Text Files 2. Binary Files Exercise 1 Create an array of Course objects taken from the user. The class Course has the following attributes: code like "ICS201", name like "Introduction to Computing II", and credit hours like 4. Save the array to both a text file, and a binary file. Exercise 2 Write a program that reads the text file created in Exercise 1 into an array...
1. What happens in the Java Virtual Machine (JVM) when the following line is processed? MyClass n = new MyClass(); A. Nothing, the line is skipped, since no parameters are defined B. An object of type MyClass is created, no reference is created C. A reference to an object of type MyClass is created, no object is created D. Both a reference and an object of type MyClass are created 2. Which of the following is true? A. A single...