100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

Intro to Java Programming UPDATED ACTUAL Exam Questions and CORRECT Answers

Puntuación
-
Vendido
-
Páginas
37
Grado
A+
Subido en
24-06-2025
Escrito en
2024/2025

Intro to Java Programming UPDATED ACTUAL Exam Questions and CORRECT Answers

Institución
JAVA
Grado
JAVA











Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
JAVA
Grado
JAVA

Información del documento

Subido en
24 de junio de 2025
Número de páginas
37
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

Intro to Java Programming UPDATED ACTUAL Exam Questions
and CORRECT Answers


For the Java program below, what file name should the source code be stored in?

public class MyProg{System.out.println( "Hello World" );}
Select one:

A. MyProg.txt

B. MyProg.docx

C. MyProg.java

D. Any file name with a .java extension - MyProg.java



Which of the following is the correct way to write the header for a main method?
Select one:

A. public static void main( string [] args )

B. public static void main( String [] args )

C. public static void Main( String [] args )

D. public static main( String [] args ) - public static void main( String [] args )



__________ is considered to be the brain of a computer.

Select one:
A. hardware

B. CPU

C. memory

D. disk drive - CPU



Which JDK command will compile a Java program named YourProgram?
Select one:

,A. java YourProgram

B. java YourProgram.java

C. javac YourProgram.java

D. javac YourProgram - javac YourProgram.java


What is the output of the following program?

public class 6Times2{public static void main( String [] args ){System.out.println( "6 times 2 is
12" );}}

Select one:
A. "6 times 2 is 12"

B. 6 times 2 is 12

C. The program will not compile

D. The program will compile, but it will produce a runtime error - The program will not compile


Which of the following statements are true? (select all that apply)

Select one or more:

A. The Java compiler translates source code into machine language that can be directly executed
on a computer.

B. The output file produced by the Java compiler is architecturally neutral.

C. A Java program named MyProgram should be stored in a file named MyProgram.java.
D. The Java language is a high-level programming language. - A and D



What was the original name for the Java language?

Select one:
A. Java

B. Oak

C. Maple
D. D - Oak

,What is the output of the following code?

public static void main( String [] args ){int a;int b = 10;a = 9;c = a + b;System.out.println( a +
"\t" + b + "\t" + c );}

Select one:

A. 9 10 19

B. a = 9 b = 10 c = 19
C. The program will not compile and run

D. The program will compile, but a runtime error will be generated - The program will not
compile and run



Which of the following is accomplished in the Java statement int myVariable; ? (select all that
apply)

Select one or more:

A. The name myVariable is made known to a portion of the program.

B. The data type int is associated with myVariable.

C. The value of myVariable is initialized to zero by default.

D. The value of myVariable is not initialized. - A,B, and D


Which of the following are valid Java variable names? (select all that apply)

Select one or more:

A. Hello

B. test_score

C. 4ere

D. 5+5

E. float - A and B


Which of the following statements is true?

, Select one:

A. The portion of a program over which a variable is known and can be referenced is called a
variable's duration.

B. The portion of a program over which a variable is known and can be referenced is called a
variable's lifetime.

C. The portion of a program over which a variable is known and can be referenced is called a
variable's scope.

D. None of the above are true. - C. The portion of a program over which a variable is known and
can be referenced is called a variable's scope.



A Java program block is enclosed in __________.

Select one:

A. parentheses ()

B. braces {}
C. brackets []

D. quotes " " - braces



Which of the following are correct ways to declare variables? (select all that apply)

Select one or more:

A. int i; int j;

B. int i, j, k;
C. int i; j;

D. int i, int j; - A and B



Which of the following is true?

Select one:

A. A declaration statement initializes the value of a variable to a default value.
B. A declaration statement does not initialize the value of a variable to a default value.
$12.99
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
GradeVaultAcademy

Documento también disponible en un lote

Conoce al vendedor

Seller avatar
GradeVaultAcademy Havard School
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2
Miembro desde
6 meses
Número de seguidores
0
Documentos
841
Última venta
4 meses hace
GradeVault Academy.

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes