The document is a comprehensive question bank for Java programming, covering a wide range of topics including Java basics, object-oriented concepts, exception handling, and GUI programming. It consists of multiple-choice questions, short answer questions, and programming tasks designed to assess knowledge and skills in Java. The questions are categorized into sections, each requiring different levels of understanding and application of Java concepts.
The document is a comprehensive question bank for Java programming, covering a wide range of topics including Java basics, object-oriented concepts, exception handling, and GUI programming. It consists of multiple-choice questions, short answer questions, and programming tasks designed to assess knowledge and skills in Java. The questions are categorized into sections, each requiring different levels of understanding and application of Java concepts.
Q1) Attempt any EIGHT of the following : [8 × 2 = 16]
a) What is JDK? How to build and run java program? b) Explain Static keyword. c) What is use of classpath? d) What is collection? Explain collection frame work in details. e) What is the use of Reader and Writer class? f) What is the use of layout manager? g) What is difference between paint ( ) and repaint ( ). h) Explain Access modifiers used in Java. i) Define keyword throw. j) Define polymorphism. a) What is Java? Why Java is a platform neutral language? b) What is access specifiers? List them. c) Define Keyword-Static. d) Why we set environment variable in Java? e) Write advantages of Inheritance. f) Define class and object with one example. g) What is Swing? h) When buffered reader is used? i) What is main difference between exception and error? j) What is Panel? a) What is a java program structure? b) Define this Keyword. c) Explain in detail the data types in java? d) What is an Interface? e) What is the use of Reader and Writer class? f) Which method is used to specify containers layout with syntax. g) What is the default layout for Frame and Panel? h) Explain Modifiers and Access Controls used in java. i) List and explain any 2 in-built exceptions. j) Explain the purpose of getContentPane(). i) Define variable in Java? What are the naming rules of variable? ii) What is recursion? iii) Define Inheritance? iv) What is difference between Anay and Array List? v) What is error? List types of error? vi) List any two restrictions for applet. vii) What is an event? viii) What is Object and Class? ix) Write the definition of abstract class? x) What is Container?
Q2) Attempt any Four: [ 4 × 4 = 16 ]
i) Write a note on package in Java. ii) What is exception? Expalin its keyword with example. iii) Explain java. util package. iv) What is a method in Java? Explain method overloading with example. v) How to handle events in applet? Explain with example. a) What is Super Keyword? Explain the use of super keyword with suitable example. b) Describe file handling in brief. c) What is datatype? Explain types of datatypes used in Java. d) What is interface? Why they are used in Java? e) Why the main() method in public static? Can we overload it? Can we run java class without main() method? a) Explain in detail the features of Java. b) What are the rules for method overloading and method overriding? Explain it with example. c) Differentiate between interface and abstract class. d) Explain the concept of exception and exception handling. e) What are the different types of streams? Explain in details. a) Explain features of Java. b) What is difference between constructor and method? Explain types of constructors. c) Differentiate between interface and abstract class. d) Explain the concept of exception and exception handling. e) Explain try and Catch with example.
Q3) Attempt any Four: [ 4 × 4 = 16 ]
i) Write a Java program using AWT to display details of Customer (cust_id, cust_name, cust_addr) from user and display it on the next frame. ii) Write a Java program to reverse elements in array. iii) Write a Java program using static method which maintain bank account information about various customers. iv) Define an abstract class Shape with abstract method area() and volume(). Write a Java program to calculate area and volume of cone and cylinder. v) Write a Java program to display smiley face using applet. a) Write a java program which accepts student details (Sid, Sname, Saddr) from user and display it on next frame. (Use AWT). b) Write a package MCA which has one class student. Accept student details through parameterized constructor. Write display() method to display details. Create a main class which will use package and calculate total marks and percentage. c) Write Java program which accepts string from user, if its length is less than five, then throw user defined exception “Invalid String” otherwise display string in uppercase. d) Write a Java Program using Applet to create login form. e) What is recursion is Java? Write a Java Program to final factorial of a given number using recursion. a) Write a java program to display alternate character from a given string. b) Write a Java program to calculate area of Circle, Triangle & Rectangle. (Use Method Overloading). c) Write a java program to search given name into the array, if it is found then display its index otherwise display appropriate message. d) Write a java program to display ASCII values of the characters from a file. e) Write a java program to display multiplication table of a given number into the List box by clicking on button. a) Write a Java program to display all the perfect numbers between 1 to n. b) Write a Java program to calculate area of circle, Triangle and Rectangle (Use Method over loading) c) Write a java program to accept n integers from the user and store them in on Arraylist collection. Display elements in reverse order. d) Write a Java program to count number of digits, spaces and characters from a file. e) Create an applet that display x and y position of the cursor movement using mouse and keyboard. (Use appropriate listener)
Q4) Attempt any Four: [ 4 × 4 = 16 ]
i) What is Layout Manager? Explain any one in detail. ii) How to create and access package in Java? Explain it with example. iii) Write a Java program to Fibonacci series. iv) Explain anonymous class in detail. v) Write a Java program to display contents of file in reverse order. a) Explain method overloading and method overriding in detail. b) Write a applet application in java for designing smiley. c) Explain in brief delegation event model for handling events. d) Write a java program to copy the dates from one file into another file. e) Write a java program to accept’ ‘n’ integers from the user & store them in an ArrayList Collection. Display the elements of ArrayList collection in reverse order. a) What is collection? Explain Collection framework in details. b) Difference between Swing and AWT. c) Create a package named Series having three different classes to print series: i) Fibonacci series ii) Cube of numbers iii) Square of numbers Write a java program to generate ‘n’ terms of the above series d) Write a ‘java’ program to check whether given number is Armstrong or not. (Use static keyword) e) Write a ‘java’ program to copy only non-numeric data from one file to another file. a) How a Java program is structured? Explain data types. b) What is applet? Explain its types. c) Write a java program to count number of Lines, words and characters from a given file. d) Write a Java program to design email registration form. (Use swing components) e) Create a class Teacher (Tid, Tname, Designation, Salary, Subject). Write a java program to accept 'n' teachers and display who teach Java subject (Use Array of object)
Q5) Write a short note any Two: [ 2 × 3 = 6 ]
i) Which are the predefined streams? ii) Define multiple inheritance. iii) Why Java is a platform neutral language? a) What is repaint method does? b) Write constructors of Jtabbed panel. c) Abstract class. a) Define new operator. b) Define term finalize () method. c) Define package with all the steps for package creation. a) Define object. b) Define term finally block. c) What is package? Write down all the steps for package creation.