You are on page 1of 4

1

JAVA Question Bank


1. 2. 3. 4. 5. 6. Explain features of Java language. State any five differences between Java and C++. Explain Common Access modifiers in JAVA. Explain in brief the different Access Specifiers in Java. What is Bytecode with reference to Java? What is the use of Bytecode? State five advantages of writing code in Java? State the various stages in code compilation of Java programs. 7. Write a short note on Garbage collection and the use of Finalize method. 8. Explain in brief different access specifiers in Java. 9. What is the use of keyword Static? What are the restrictions on methods declared as static? 10. What is Method Overloading? Explain in detail. 11. Write a short note on Abstract classes. 12. Explain Wrapper and Abstract classes in Java. 13. What are Exceptions in Java? Explain in short the common Java Exceptions. 14. Write a Java program that can manage NumberFormatExceptions. 15. What are exceptions in Java? Show how these handled using Throw, Catch, Final clauses using example. 16. Explain Access Control Rules in Java. 17. Explain Thread Synchronization and Thread Group. 18. What Thread Synchronization? How is it achieved in Java? 19. What is Object Serialization in Java? Explain Serializable, Externalizable. 20. Explain Object Serialization. 21. Write a Java program to print the prime numbers from 1-100. 22. Write a standalone Java program that displays first 20 prime numbers. 23. Write a standalone code in Java to print first 20 odd numbers. 24. Write a program to evaluate 24 + 99 + tan-1 (4) + log e 10 25. Write a Java program to find the factorial of a number. 26. Write a program to display the reverse of a number. 27. Write a program for Fibonacci series. 28. Write a Java program to check and display message whether the entered three digit number is Armstrong number. (Armstrong Number e.g. 13+53+33=153) 29. Write a program to sort an array of strings in ascending alphabetical order. 30. Write a Java program to arrange Neeta, Seeta, Mohan, Ashim, Shama, Geeta in ascending order. 31. Explain the advantages of SWING components over AWT components. 32. What are the different Layout Managers? Explain in detail. 33. State the five layouts in Layout Manager for Java AWT. Show the layouts displayed by each of these layouts.

2 34. Explain in short the use of Layout managers in Java Swing. Write a code to display the following form using Java Swing components. Also explain the different layout manager classes used in designing the form: Client Details Client No. Contact Address Submit Client Name. Contact Number Reset

35. Explain Delegation Event Model. 36. What is Tabbed Pane? What is the general procedure for adding Tabbed Panes to Applets? 37. What is an Applet? How does Applet differs from Java Application Programs? Explain in brief the different stages of an Applet life cycle. 38. What is the life cycle of Java Applet? State the methods invoked for Initialization and Termination of an applet? 39. What are the methods called during Initialization and Termination of Applets? Describe each of these methods. 40. What are Servlets? Explain the life cycle of Servlet. Distinguish between JSP and Servlets. 41. What are Servlets? What are the advantages of Servlets? Explain the life cycle of Servlet. 42. Distinguish between JSP and Servlets? Explain with the help of table how JSP page gets compiled, loaded and executed in different situations. 43. What is XSQL Servlet? Explain how data transfer takes place between the Client and the Servlets. 44. What is a Java Bean? State any three advantages of using Java bean components. Explain Introspection, Communication, Persistence, and Customization with respect to Java Bean. 45. Explain in brief a. Entity Beans, b. Session Beans, c. Message Beans with respect to Enterprise Java Beans (EJB). 46. Explain briefly the terms a. Session Beans and b. Entity Beans. 47. Explain in brief Document Type Definition (DTD) in XML with suitable example. 48. Explain in brief: Objects in ASP. 49. Explain advantages of using JavaScript on the Client side. 50. Write a JavaScript program to check and display message whether the entered three digit number is Armstrong Number and to display the reverse of the given number. (Armstrong number e.g. 13 + 53 + 33 = 153). 51. Write a JavaScript program to display the reverse of a number.

3 52. What is the difference between the HTML and XML document representation? Write code to display Hello World in XML using Cascading Style Sheet, description font style Bold, Italic, 26 pts and Silver color. 53. What are the various types of Lists in HTML pages? Write code to display each of them. 54. Discuss the different types of Lists in HTML. 55. Write an HTML code to design the following page. Explain in short the HTML tags used for designing the page. Nutrition Information Calories Regular Organic Inorganic 3 4 0 Grams 4 6 3 Moisture 100% 100% 100%

MCA Semester Results Sem - I Sem - II Sem - III 1. Programming Languages 1. Languages of 80s a. Pascal b. Cobol 2. Languages of 90s A. C++, Java 3. Languages of 2k MS.Net Python, Tel, Tk 56. Describe the steps involved in a Java program in order to get connectivity to a database. Mention any 5 classes/interfaces used for JDBC connectivity. Give details. 57. Why is JDBC and not ODBC API is used with Java. 58. Write a Java program for adding and displaying the records from ProductMaster (ProdNo, Description, Quantity, UnitPrice) table. Explain in short the classes and methods used in JDBC connection. 59. Create a class SavingAccount that stores CustomerName, AccountNumber, Balance. Include the necessary methods or constructors in order to achieve thefollowing tasks: 1. Accept deposit from a customer and update the balance. 2. Permit withdrawl, after checking for the minimum balance and update the balance. 65% 63% 66%

4 3. Display CustomerName, AccountNumber and Balance after transaction.

You might also like