Sie sind auf Seite 1von 3

|| Swami Shreeji || SHREE M. & N. VIRANI SCIENCE COLLEGE B.C.A - (Sem.

-4) (CBCS) PRILIM EXAM JAVA PROGRAMMING Date:- 30/03/2012 Section A Q-1 Give the answer of the following : 1. Full form of JVM is _________ . (a) Java Variable Machine (c) Java Virtual Machine 20 Marks (b) Java Virtual Mechanism (d) Java Variable Mechanism Marks:-70

2. Size of short data type is ______ bytes. (a) 1 (b) 2 (c) 8 (d) 16 3. The instanceof operator returns a _______ value. (a) boolean (b) char (c) double (d) int 4. When a variable is declared as private, it can be used in _______ . (a) Every class and every package (b) Every class in same package (c) Subclass in another package (d) Only within its class 5. In Java the method written in other language can be called by _____ keyword. (a) volatile (b) native (c) friend (d) default 6. When a class is declared as final, then ______ . (a) It can not be inherited (b) It must be inherited (c) Its object can not be created (d) None of this 7. To create a package, ______ keyword is used. (a) import (b) package (c) pack (d) include 8. To implement an interface _______ keyword is used. (a) extends (b) interface (c) implements (d) implement 9. A method implementation of an interface must be declared as ______ . (a) public (b) private (c) protected (d) None of above 10. Exception is a subclass of ______ class. (a) Error (b) Throwable (c) IOException (d) None of above 11. String class belongs into ______ package. (a) java.io (b) java.lang (c) java.util (d) java.string 12. Which package in imported implicitly? (a) java.io (b) java.lang

(c) java.util

(d) java.applet

13. The default priority of method is ______ . (a) 1 (b) 5 (c) 10 (d) 0 14. Which of the following is not a byte stream class? (a) InputStream (b) OutputStream (c) PrintWriter (d) PrintStream 15. The constructor of Font class is _______ . (a) Font(String name) (b) Font(String name, int size) (c) Font(String name, int style) (d) Font(String name, int style, int size) 16. Button class generates _______ events. (a) ActionEvent (b) ItemEvent (c) ClickEvent (d) ButtonEvent 17. Which method is not included into KeyListener interface? (a) keyTyped() (b) keyChanged() (c) keyPressed() (d) keyReleased() 18. The default layout manager is ________ . (a) FlowLayout (b) BorderLayout (c) GridLayout (d) None of above 19. Which layout manager allows having components of different width and height? (a) GridBagLayout (b) BorderLayout (c) GridLayout (d) CardLayout 20. The full form of AWT is ______ . (a) Abstract Window Tools (c) Abstract Window Type

(b) Abstract Window Toolkit (d) None of above

Q- 2

SECTION - II (a) Write the answer of the following questions. (Any three) 1. List out the components of JDK. 2. What is byte code? 3. List out Java API packages. 4. List out different wrapper classes. 5. What is over loading method? 6. List out different modifiers. (b) Write the answer of the following questions. (Any three) 1. Explain for loop. 2. Why Java is platform independent language ? 3. Give difference between over loading and overriding methods. 4. Write a Java program which demonstrate inheritance concept. 5. Explain final key word. 6. Explain super key word with simple example. (c) Write the answer of the following questions. (Any two) 1. Explain Data types of Java. 2. Describe Java program structure with simple example.

6 Marks

9 Marks

10 Marks

3. What is package? Explain how we can create and use package. 4. Explain interface with simple example. 5. Describe features of Java. Q- 3 (a) Write the answer of the following questions. (Any three) 1. List out methods of Graphics class. 2. List out different event listeners. 3. List out different character stream class. 4. Give difference between Choice and List component. 5. Give the difference between String and StringBuffer class. 6. Give difference between Applet and Application. 6 Marks

(b) Write the answer of the following questions. (Any three) 1. Explain different attributes of Applet tag. 2. Explain suspend(), sleep() and wait() methods. 3. Explain implantation of thread. 4. List out different constructor of TextArea class. 5. Explain fillRect() and fillOval() methods of Graphics class. 6. Explain length(), substring() and replace() methods of String class.

9 Marks

(c) Write the answer of the following questions. (Any two) 1. Explain life cycle of Thread. 2. Explain life cycle of Applet. 3. Write an applet program having three button named as Rectangle, Circle and Line. When user click on particular button related shape should be drawn into applet window. 4. List out different Layouts and explain any one with example. 5. Write a program to copy one file into other file. Best of Luck

10 Marks

Das könnte Ihnen auch gefallen