Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Java with Python So-23

The document outlines the final examination for a course on Java with Python at the George Telegraph Training Institute, covering trade theory. It includes multiple-choice questions, short notes, and descriptive questions related to Java programming concepts. The exam is scheduled for September and October 2023, with a total duration of 2 hours and full marks of 100.

Uploaded by

anitashaw497
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Java with Python So-23

The document outlines the final examination for a course on Java with Python at the George Telegraph Training Institute, covering trade theory. It includes multiple-choice questions, short notes, and descriptive questions related to Java programming concepts. The exam is scheduled for September and October 2023, with a total duration of 2 hours and full marks of 100.

Uploaded by

anitashaw497
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

THE GEORGE TELEGRAPH TRAINING INSTITUTE

COURSE: JAVA WITH PYTHON (3 Months)

EXAMINATION: FINAL

SUBJECT: TRADE THEORY

Session: September, October 2023 (For Regular & Supplementary)

Time: 2 Hours Full Marks:


100

1. Which of the following is not a Java features? (1x20)=20

a. Dynamic
b. Architecture Neutral
c. Use of pointers
d. Object-oriented

2. The \u0021 article referred to as a

a. Unicode escape sequence


b. Octal escape
c. Hexadecimal
d. Line feed

3. _____ is used to find and fix bugs in the Java programs.

a. JVM
b. JRE
c. JDK
d. JDB

1|P a ge
4. What does the expression float a = 35 / 0 return?

a. 0
b. Not a Number
c. Infinity
d. Run time exception

5. Evaluate the following Java expression, if x=3, y=5, and z=10:

++z + y - y + z + x++

a. 24

b. 23

c. 20

d. 25

6. Which of the following for loop declaration is not valid?

a. for ( int i = 99; i >= 0; i / 9 )


b. for ( int i = 7; i <= 77; i += 7 )
c. for ( int i = 20; i >= 2; - -i )
d. for ( int i = 2; i <= 20; i = 2* i )

7. Which keyword is used for accessing the features of a package?

a. package
b. import
c. extends
d. export

8. In java, jar stands for_____.

a. Java Archive Runner


b. Java Application Resource
c. Java Application Runner
d. None of the above

2|P a ge
9. Given that Student is a class, how many reference variables and objects
are created by the following code?

Student studentName, studentId;

studentName = new Student();

Student stud_class = new Student();

a. Three reference variables and two objects are created.

b. Two reference variables and two objects are created.

c. One reference variable and two objects are created.

d. Three reference variables and three objects are created.

10. Given,

ArrayList list = new ArrayList();

What is the initial quantity of the ArrayList list?

a. 5

b. 10

c. 0

d. 100

11. How many threads can be executed at a time?

a. Only one thread


b. Multiple threads
c. Only main (main() method) thread
d. Two threads

12. If a thread goes to sleep

a. It releases all the locks it has.


b. It does not release any locks.
c. It releases half of its locks.
d. It releases all of its lock except one.

13. Which of the following modifiers can be used for a variable so that it can
be accessed by any thread or a part of a program?

3|P a ge
a. global
b. transient
c. volatile
d. default

14. In character stream I/O, a single read/write operation performs _____.

a. Two bytes read/write at a time.


b. Eight bytes read/write at a time.
c. One byte read/write at a time.
d. Five bytes read/ write at a time.

15. What is the default encoding for an OutputStreamWriter?

a. UTF-8
b. Default encoding of the host platform
c. UTF-12
d. None of the above

16. Who invented Java Programming?


a) Guido van Rossum
b) James Gosling
c) Dennis Ritchie
d) Bjarne Stroustrup

17. Which of these cannot be used for a variable name in Java?


a) Identifier & keyword
b) identifier
c) keyword
d) none of the mentioned

18. What is the extension of java code files?


a) .js
b) .txt
c) .class
d) .java

19. Which of the following is not an OOPS concept in Java?


a) Polymorphism
b) Inheritance

4|P a ge
c) Compilation
d) Encapsulation

20. Which of the following is a type of polymorphism in Java Programming?


a) Multiple polymorphism
b) Compile time polymorphism
c) Multilevel polymorphism
d) Execution time polymorphism

2. Short notes (answer any ten)


4x10=40

i. Class vii. For Loop

ii. Object viii. Exception Handling

iii. Polymorphism ix. Dictionary

iv. Conditional Operator x. Lists and Tuples

v. Switch Case xi. Nested Loops

vi. For Loop xii. Method Overloading

3. Descriptive question (Answer any four)


10x4=40

i. Take three numbers and find the greatest among three numbers in Python

ii. Take one year and cheek leap year or not in Java

iii. Take the Length, Breadth and Width of two boxes and find volume using
Java

iv. Take one number and cheek even or odd using Python

v. What is Inheritance in Java? Write down the types of Inheritances in Java.


Write a program to explain Single Inheritance in Java.

5|P a ge

You might also like