The document outlines an assignment for a Java programming course, detailing questions related to Java's execution process, object-oriented programming principles, and the Java Virtual Machine. It includes multiple-choice questions that assess understanding of Java's compilation and execution steps, as well as key concepts in Java programming. The assignment is due on August 6, 2025, and allows for multiple submissions before the final grading.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
22 views5 pages
NPTEL Java Week 1 Assignment
The document outlines an assignment for a Java programming course, detailing questions related to Java's execution process, object-oriented programming principles, and the Java Virtual Machine. It includes multiple-choice questions that assess understanding of Java's compilation and execution steps, as well as key concepts in Java programming. The assignment is due on August 6, 2025, and allows for multiple submissions before the final grading.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
15:24
OQ 2% ourses.nptel.ac.in +
Week
1:Assignment 1
Your last recorded Due date: 2025-08-06, 23:59 IST.
submission was on 2025-08-04, 22:15 IST
1) 1 point
Which of the following is true?
a. Java uses only interpreter.
b, Java uses only compiler.
c. Java uses both interpreter and compiler.
d. None of the above.
Oa
Ob.
Go.
Oa
2) 1 point
A Java file with extension ‘.class’ contains
a, Java source code
b. HTML tags
c. Java Byte code
d. A program file written in Java programming language
Oa.
> °
Ge.
Pie eee4 @ woe a
5 ourses.nptel.ac.in +
3) 1 point
Which of the following is not an object-oriented programming paradigm?
a. Encapsulation
b, Inheritance
‘&. Polymorphism
d, Dynamic memory allocation
4) 1 point
Wt wil be the autput of the follwing Ia code?
5) 1 point
hati the comet saguanc of steps to enecite Java program?
1. comple th reson: Use the java command to complete cod ite byeacode,
1, Edtthe Program: Write the code ina text editor or IDE.
1M. Runthe Program: Use the java command to execute the bytecode,
Which ofthe fllowing options represents the sequence?
‘4, Run > Eat Compe
Eat Run Compile
o Gudnittin etn.25 ourses.nptel.ac.in +
5) 1 point
Whats the corect sequence of steps to execute a Java program?
1. Compitethe Program: Use the jvac com rnpile the code int bytecode,
Ih. Edit the Program: Write the code Ina text editor or IDE.
|i, Run the Program: Use thejava command to execute the bytecode,
\Which ofthe following options represents this sequence?
2. Run > Edit > Compile
bs it > Run > Compile
Compile Eat Run
4, Edit > Compile > Run
Oa
Ob.
Oc.
@a
6)
‘Consider the fllowing code.
1 point
\Whatisthe output ofthe above code?
Helo, Wort
HelioWorat
& Complationror
1. Runtine Error
@a
Ob
Oc
Oa
7) 1 point
What is the primary focus of Java programming?
a. Low-level optimizations
b. Hardware-specific operations25 ourses.nptel.acin +
7) 1 point
What is the primary focus of Java programming?
a. Low-level optimizations
b. Hardware-specific operations
2
. Platform independence
d. Assembly language programming
8) 1 point
Which of the following programming principles is a key aspect of Java?
‘a. Code obfuscation
bb, Platform dependence
¢. Object-oriented programming
d. Global variables
9) 1 point
\Whattathe primary purpose ofthe Java Vicual Machine (VM in the Java programming language?
2 Code optinzation
be, Platform independence
Memory management
4. Hardware-speciic operations
c/\3:25 O28 098 eT ED
} 26 ourses.nptel.acin +
9) 1 point
‘What the primary purpose ofthe Java Vial Machine (VM inthe Java programming language?
2 Code optimization
b. Platform independence
Memory management
4. Hordware-speciic operations
Oa
@r.
Oc.
Oa.
10) 1 point
Consider the following program.
‘ubiie
What the outputfthe above code?
250
b10
Compiler eror
as
@a
Ob.
Oc.
Oa
You may submit any number of times before the due
date. The final submission will be considered for
grading.
STUN