Gujarat Technological UniversityWinter 2025 examination

GTU 3140705 Object Oriented Programming -I (Java) Winter 2025 Question Paper & PDF

B.E. · Computer Engineering · Semester 4 · Subject code 3140705
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 2:30 PM – 5:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

5 of 25 questions on this paper were also asked in other years. 1 more is a type of question GTU sets again with new data. Each is marked below with the years it appeared.See all 25 repeated 3140705 questions, most asked first

Q.1

14 Marks
(a)
3 marks
(
i)What happens when your program attempts to access an array element with an invalid index?
ii)What are the benefits of data field encapsulation?
iii)What is the registration method for a button to register an Action Event handler?
(b)
4 marks
Differentiate following:
i)abstract class with interface
ii)String with String Buffer
(c)
7 marks

Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: public static int[] eliminate Duplicates(int[] list). Write a test program that reads in ten integers, invokes the method, and displays the result.

Q.2

14 Marks
(a)
3 marks
Compare static methods with instance methods.
(b)
4 marks

How do you create a button with a text and a node? How do you set a handler for processing a button-clicked action?

(c)
7 marksAsked in 2 of 7 papers

What is exception? Explain the use of exception handling keywords with example.

Also asked in Summer 2024 Q3c OR

(c)
7 marks
How do interfaces support polymorphism? Explain with example.

Q.3

14 Marks
(a)
3 marks
What is polymorphism? What is dynamic binding?
(b)
4 marks
Explain the use of File class to handle I/O.
(c)
7 marks

Write the bin2Dec(String binary String) method to convert a binary string into a decimal number. Implement the bin2Dec method to throw a Number Format Exception if the string is not a binary string.

(a)
3 marks

How do you prevent a class from being extended? How do you prevent a method from being overridden?

(b)
4 marks
Differentiate the followings:
i)Checked and Unchecked Exceptions
ii)Text I/O and Binary I/O
(c)
7 marks

Write a program that lets users copy files. The user needs to provide a source file and a target file as command-line arguments using the command: java Copy source target

Q.4

14 Marks
(a)
3 marks

Define the compare To method in a class implementing the Comparable interface. What are the benefits of implementing the Comparable interface?

(b)
4 marksAsked in 5 of 7 papers
What do you understand by thread? Describe the complete life cycle of thread.

Also asked in Summer 2026 Q5c, Summer 2025 Q5b, Summer 2024 Q5a OR, Summer 2023 Q3a OR

(c)
7 marks
Describe and compare Hash Map, Linked Hash Map, and Tree Map.
(a)
3 marks

What is a recursive method? Write a recursive mathematical definition for computing 2n for a positive integer n.

(b)
4 marks

What do you mean by thread synchronization? How can you synchronize java threads?

(c)
7 marks

Write a program to add ten elements in a list and traverse a list in both directions.

Q.5

14 Marks
(a)
3 marksAsked in 2 of 7 papers

What are the benefits of using generic types? How do you declare a generic type in a class?

Also asked in Summer 2025 Q4c

(b)
4 marksAsked in 2 of 7 papers

Which method do you use to obtain an element in the collection from an iterator? Explain with example.

Also asked in Winter 2023 Q5b

(c)
7 marksSame type asked in 4 of 7 papers

Which layout panes are supported by JavaFX? Write a program to create a login screen using Grid Pane.

Also asked in Winter 2024 Q5c OR, Summer 2024 Q4c OR, Winter 2023 Q5c OR

(a)
3 marksAsked in 2 of 7 papers
How do you declare and invoke a generic method?

Also asked in Summer 2025 Q4c OR

(b)
4 marks
How do create and use anonymous inner class?
(c)
7 marks

Write a program to define and register handlers for key pressed, key released, and key typed events using JavaFX.

More Object Oriented Programming -I papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper for Object Oriented Programming -I (Java) (Winter 2025, B.E. · Computer Engineering, Sem 4). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

ViewDownload PDF