java main
java main
LOYOLA COLLEGE OF ARTS & SCIENCE, METTALA (a) Final variables b) abstract method
DEPSARTMENT OF COMPUTER APPLICATIONS c) non abstract methods d) final variables and abstract
MODEL EXAMINATION methods
MAY – 2023
10. thread priority in java is?
Class: II-BCA Semester : Duration: 3 Hours a) Integer b) float c) double d) long
Date : Paper Code:
20UCA08 Max. Marks : 75 11. when a class extends the thread class it should override methods of
Session : FN
Paper Title: threads class to start the thread
JAVA PROGRAMMING a) start b) run c) inti d) go
Section - A 12. Which function of predefined class Thread is used to check whether
Choose the Correct Answer: 15 x 1 = 15 current thread being checked is still running?
1. Who invented Java Programming? a) is alive () b) join() c) is running() d) Alive()
(a) Guido van Rossum (b) James Gosling 13. which of these methods can be used to output a string in an applet?
(c) Dennis Ritchie (d) Bjarne Stroustrup a) display () b) print() c) drawstring d) transient
14. which of these class contains the methods used to write in a file?
2. Which component is used to compile, debug and execute the Java
a) File stream b)Fileinputstream
programs?
c) Buffered output stream d)Filebufferstream
(a) JRE (b) JIT (c) JDK (d)
JVM 15. which of these exception is thrown in case when the file specified for
3. What is the extension of java code files? writing is not found?
(a) Js (b) txt (c) .class (d). Java
4. Which of the following is not a valid jump statement? a) IOException b) FileException c) FilenotfoundException
(a) return (b)continue (c) break (d) go to d) FileinputException
5. Which of the following is not a decision making statement?
(a) if-else (b) do-while wo (c) switch (d) if
6. Which of the following is used with the switch statement? Section- B
(a) break () (b)do (c) Exit (d) Continue
Answer Any Two of the following Questions: 2 x 5 = 10
7. Which of these keywords is used to define interfaces in Java?
16. List the Eight Basic Data types used in Java. Give Examples
(a) interface () (b)Interface (c) nth so (d) Intf
8. what keyword is used to declare an interface in java? 17. Discuss in detail about Classes and Objects in Java with example
(a) Class b) interface c) implements d) abstract 18. Examine in detail about how to handle Packages Classes? Explain
9. java interface can contain with example
3 4
19. Analyse in brief about the method for passing parameters to applets (OR)
with Illustrative Program. (b). What are the uses of is Alive () and join methods in threads? Examine
20. What are Input and Output Streams? Explain with examples. with suitable example.
25. (a) Determine in detail about Java Graphics Class using Line Syntax with
Section - C
example.
Answer All the Questions: 5 x 10 = 50
(OR)
21. Ioexception
(b). Elucidate on Java Graphics Class using Rectangle Syntax with
(a) What is a token? Examine with suitable tokens supported by Java.
example
example.
(OR)
*****
(b). Enumerate in briefly about different kinds of operators in Java
with examples
22. (a) Write a Java Program to find all possible Elucidate on Java Graphics
Class using roots of a quadratic’ equation Ax + Bx +C =0.
(OR)
23. (a) What are the Applications of wrapper classes? Explain with examples.
(OR)
24.(a) What are the uses of try and catch statement in Java? Explain with
example.
3 4