0% found this document useful (0 votes)
7 views

OOP Java Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

OOP Java Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Object Oriented Programming

1
01. Describe the java platform. [Slide - 7; 01_Java-Introduction]
02. Describe the safeguards that are in place to prevent JAVA programs received over
the network from causing harm to our system?[Slide - 15,
03. Explain the attributes that contribute to the Java platform's independence. [Slide -
11-13; 01_Java-Introduction]
04. Explain the differences between ‘java’ and ‘javac’. [Slide - 10, 13;
01_Java-Introduction]
05. Write the requirement for "main" to be declared as ‘static’ from. [Slide - 22;
01_Java-Introduction]
06. Distinguish between primitive and non-primitive data types, and provide an example
for each. [Slide - 33,34]
07. Provide some examples of local variable inference? [Slide - 79-83;
01_Java-Introduction]
08. Explain working of java virtual machine (JVM) also explain how java is an
architectural neutral.[Slide - 12(VM); 01_Java-Introduction]
09. JAVA program is to be compiled first and then to be interpreted for execution. True or
false? Justify your answer. [Slide - 16; 01_Java-Introduction]
10. Draw and explain the process of building and running the JAVA Program. [Slide - 7,
8; 01_Java-Introduction]
11. Define the following.
a. Byte code
b. JAVA Virtual Machine
12. Are there any performance differences between the following two import statements?
a. import java.util.Scanner;
b. import java.util.*;
13. Translate the following algorithm into Java code:
a. Step 1: Declare a double variable named celcius with the initial value of the
last 2 digits of your ID .
b. Step 2: Declare a double constant named CELCIUS_TO_KELVIN with value
273 .
c. Step 3: Declare a double variable named kelvin , add CELCIUS_TO_KELVIN,
and assign the result to kelvin .
d. Step 4: Display kelvin to the console.
Write the kelvin value after Step 4?
14. Write a program that displays the area and perimeter of a circle that has a radius
which you take as input
a. formula: perimeter = 2 * radius * p area = radius * radius * p
15. Write a code to take your ID as input.
16. Mention the differences between a while loop and a do-while loop? Convert the
following while loop into a do-while loop in the context of JAVA.

MD NAZRUL ISLAM, Lecturer, Dept. of CSE


Object Oriented Programming

17. Explain the differences among string, stringbuilder and stringbuffer. [Slide - 26,
01_Java-Strings]
18. Suppose you have to perform thread safety operation with faster operation. There will
be negligible modifications to the value assigned to a variable. Which string class you
would use.
19. Explain the following code segment

MD NAZRUL ISLAM, Lecturer, Dept. of CSE

You might also like