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

BCA Question Bank - JAVA

Questions

Uploaded by

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

BCA Question Bank - JAVA

Questions

Uploaded by

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

BCACACN203-Object Oriented concepts using Java

UNIT I

Questions carrying 2 marks

1. What is Object Oriented Programming?

2. Define the terms i) Data Encapsulation ii) Data Abstraction

3. What do you mean by data hiding ?

4. What is Polymorphism? Give example

5. What is dynamic binding?

6. Mention any four advantages of OOP.

7. Mention any four application areas of OOP.

8. What is Java Bytecode?

9. List any four features of Java

10. Write the meaning of public static void main(String args[])

11. Mention two ways of writing comments in Java

12. List any 4 primitive data types available in Java.

13. What is the difference between 10.3 and 10.3f?

14. What are the two ways of initializing variables?

15. What is dynamic initialization of variables? Give example.

16. List different arithmetic operators available in Java

17. What is type conversion? What are its types?

18. What is automatic (implicit) type conversion? Give example

19. Write the meaning of System.out.println()

20. Write a single print statement to produce the following output

a. ONE

b. TWO

c. THREE

21. What is stream? List different types of streams in Java.

22. Differentiate byte and character streams.

23. List the predefined streams of system object

24. Write the syntax of simple if statement with example.

25. Write the syntax of switch statement.


26. Give the syntax of declaring a symbolic constant with example.

Questions carrying 4 or more marks

1. Explain various features of OOP.

2. Write a note on application and benefits of OOP.

3. List and explain different features of Java

4. Explain a simple java program with example.

5. Explain the java program structure with example.

6. What are identifiers? Write the rules to be followed when creating an identifier.

7. List and explain different primitive data types available in Java.

8. Explain automatic type conversion with suitable code example.

9. Explain explicit type conversion with example.

10. What are streams? List and explain different byte and character streams

11. Explain the relational and logical operators with example.

12. Explain the increment , decrement and conditional operator with syntax and example.

13. Explain the process of reading a character from the keyboard with suitable example.

14. Explain different forms of if statement with syntax and example

15. Explain switch statement with syntax and example

UNIT II

Questions carrying 2 marks

1. What is the purpose of break and continue statement ? Give example.

2. Write the for statement for a loop that counts from 1000 to 0 by -2

3. Write a for loop to display even numbers between 1 and 100

4. What are arrays?

5. How to create and instantiate a one dimensional array? Give example

6. How to initialize an array at the time of creation? Give example.

7. What is the use of length member of arrays?

8. How to create and instantiate a two dimensional array? Give example

9. What are different ways of constructing String? Give example.

10. List any four methods associated with Strings.

11. What is vector? How it is different from array?

12. What are classes and objects?


13. What is the purpose of new operator?

14. Write the syntax to create a class in Java.

15. Write a statement that creates and instantiates an object in Java.

16. What are constructors? What is the purpose of a constructor?

17. What is the use of this keyword in java?

18. List any two restrictions of static methods.

Questions carrying 4 or more marks

1. Explain for loop with syntax and example.

2. Explain any three forms of for loop with suitable example.

3. Explain while loop with syntax and example

4. Explain do while loop with syntax and example.

5. Explain break and continue statement with suitable example.

6. Explain the use of for each style of loop with suitable code example.

7. What are arrays? Explain how to declare instantiate initialize and use a onedimensional array
with suitable code example.

8. Explain different methods to initialize an array with suitable example.

9. Explain any four string methods with suitable example.

10. Explain any five vector methods with code example.

11. Explain the wrapper class methods String() , valueOf() and parsing methods with

syntax and example.

12. Write the general form of a class? Explain how to define a class in Java with suitable

example.

13. Explain how to create an object in Java with suitable example.

14. Explain the use of Constructors with suitable example.

15. Explain command line arguments in Java with example.

16. Explain how to pass objects to methods with suitable example.

17. Explain how to return an object from a method with suitable example

18. Explain method overloading with suitable example.

19. What is recursion? Illustrate recursion with a code example.

20. Explain static variable and methods with suitable example.

21. Create a class Student with members Register number, name and marks in three
subjects. Use constructors to initialize objects and write a method that displays the

information of a student.

22. Explain constructor overloading with suitable example.

23. Explain how to pass variable-length arguments with suitable example.

UNIT III

Questions carrying 2 marks

1. What is inheritance?

2. What is the purpose of keyword extends?

3. What is the purpose of super()?

4. What are abstract classes?

5. What are abstract methods?

6. How to prevent methods from overriding?

7. What are final variables?

8. What is the purpose of final class?

9. What are final methods?

10. How to define a package?

11. How to import a package?

12. List any four API packages of Java.

13. What are different methods of creating threads?

14. List different states of a thread.

15. List any four thread methods.

16. What is the purpose of notify() and notifyall() method?

17. Differentiate suspend() and stop() methods of a thread.

18. What is the purpose of resume() method?

19. What is the purpose of wait() and notify() methods?

20. What is the purpose of exception handler?

21. List any four types of exceptions in Java.

22. What is the purpose of try and catch block?

Questions carrying 4 or more marks

1. Explain how a superclass reference can refer to a subclass object with suitable

example.
2. Explain single inheritance with suitable example.

3. Explain method overriding with suitable example.

4. Explain multi-level inheritance with suitable example.

5. Explain the purpose abstract and final classes.

6. Explain how to create and use a package in Java with suitable example.

7. List and explain different API packages available in Java.

8. Explain how to create and implement interface using suitable example.

9. Explain the process of creating a thread by implementing Runnable interface with

suitable example.

10. List and explain any five thread methods

11. Explain the life cycle of a Thread with diagram.

12. Explain exception handling in Java with suitable example.

13. Illustrate the use of multiple catch statements with suitable example.

14. List and explain different methods of Throwable class.

15. Illustrate the use of finally with suitable example.

16. List and explain any 5 built-in exceptions of Java

17. Explain how to create user defined exceptions in Java with example.

Unit IV

Questions carrying 2 marks

1. What is an Applet?

2. List two types of Applets available in Java.

Page 25 of 25

3. What is the purpose of appletviewer?

4. Write HTML file to run an applet program named Simple.

5. List any two features of Applets.

6. What is the purpose of paint() method?

7. List any four methods associated with Applets

8. What is the purpose of repaint() method?

9. Differentiate stop() and destroy() methods.

10. What is the purpose of update() method.

11. List the superclasses of Applet defined by AWT


12. List any 4 methods defined by Applet

13. What is an event? Give example. 15. What is a listener?

14. What is the purpose of Event Listener?

15. List the key features of a swing GUI

16. What happens when the constructor JButton(String msg) is called?

17. What is the purpose of setText() and getText() methods?

Questions carrying 4 or more marks

1. Write the complete Applet skeleton with example.

2. List and explain any 6 methods defined by Applet

3. List and explain the components of Delegation Event Model

4. List and explain any 6 event classes in java.awt.event

5. List and explain different Event Listener Interfaces

6. Explain how any two Mouse events are handled in Applets with suitable example

7. Explain how any two Key events are handled in Applets with suitable example

8. Explain the purpose of JButton and explain any four methods associated with it.

9. Explain the use of JTextField and any four methods associate with it

10. Explain the use of JList and any for methods associated with it.

11. Illustrate the use of Label with suitable example.

12. List and explain different methods associated with JCheckBox.

13. Explain different methods associate with JRadioButton control with suitable example.

14. Explain with example creating a Frame window in Applet.

15. Write a note on Swing Components and Containers.

16. Write and explain a simple swing application program.

You might also like