PYQ – JAVA PROGRAMMING (2418401) | SEMESTER 4TH (2ND YEAR) | Year 2018
JAVA Programming 2018 (OLD) PYQ.

Group A
Choose the most suitable answer from the following options:
- (1*20=20)
(i)Which of the following variable declaration would not compiled in a java
program
(a) int var
(b) float var
(c) double var
(d) int-I-var
(ii) A constructor is related with
(a) Same name as the class it is declared within
(b) Is used to create package
(c) Is used to define Applet constructor
(d) All of above
(iii) JVM is a
(a) Java virtual machine
(b) Java variable modifier
(c) Java vertical machine
(d) Java vendor machine
(iv) What is byte code in context of Java
(a) The type of code generated by Java compiler
(b) Code generated by Java virtual machine
(c) Another name of Java source file
(d) Related with Java comments
(v) The Java run time system automatically calls this method while
garbage collection
(a) finalizer ()
(b) finalize ()
(c) finally ()
(d) fanalised ()
(vi) An overloaded method consist of
(a) with same method but different types of
parameters
(b) with different method name only
(c) method name may be same or different
(d) all of above
(vii) A protected member can be accessed in
(a) subclass of same package
(b) non sub- class of same package
(c) non sub class of different package
(d) true for both (a) and (b)
(viii) All exception types are sub classes of the built in class in
(a) Exception
(b)Run time exception
(c) Error
(d) Throwable
(ix) In Java , objects are passed as
(a) copy of that object
(b) Method call by value
(c) Memory address
(d) constructor
(x) Which of following not a component of Java IDE
(a) Net Beans
(b) Borland's Jbuilder
(c) MS J++
(d) Symantec visual cafe
(xi) Which of following is incorrect name
(a) xyz
(b) 2nd name
(c) xy2z
(d) xyz2
(xii) Applet cann't be viewed using
(a) Netscape navigator
(b) Internet Explorer
(c) Sun Hot Java Browser
(d) Applet viewer tool which comes with JDK
(xiii) Java compiler Javac translate Java source code into
(a) Assembly language
(b) Byte code
(c) Bit code
(d) Machine code
(xiv) In Java character const value is its integer value in the
(a) EBCDIC char set
(b) Unicode char code
(c) ASCII char code
(d) Binary code
(xv) Which one of the used to document the program and improve its readability
(a) System calls
(b) Keyword
(c) Comments
(d) Blocks
(xvi) In Java , a try block should immediately followed by one or more
(a) Throw blocks
(b) Run blocks
(c) Catch blocks
(d) Exit blocks
(xvii)When one object acquires the properties of another objects is called
(a) Encapsulation
(b) Polymorphism
(c) Overloading
(d) Inheritance
(xviii) Multiple inheritance means
(a) One class inheriting more super class
(b) More class inheriting from one super class
(c) One class inheriting one super class
(d) None of above
(xix) The wrapping of data and functions into a single units is called
(a) Encapsulation
(b) Abstraction
(c) Data hiding
(d) polymorphism
(xx) Which of the following has a method name flush ()
(a) Input stream
(b) Output stream
(c) Reader stream
(d) Input reader stream
Group B
➥ Answer all Five Questions: - (5*4=20) `
2. What do you mean by Java Virtual Machine (JVM) ? Explain it.
OR
Write
different characteristics of Java programming language.
3. Define different operator of java programming with example.
OR
Define Do While and While loop with the helps of examples.
4. Write any program in Java using Switch case.
OR
What do you mean by keywords of Java programming? Explain in brief with example.
5. Write a program in Java to generate Prime number up-to 100.
OR
Write
a program in Java to find sum of Prime number up-to 22
6. Write a program in Java to read string "xyz".
OR
Write a program in Java to count number of alphabets of any string.
Group C
➥ Answer all five questions: - (5*6=30)
7. What do you mean by constructor? Explain it.
OR
Write a program in Java using function to add two numbers.
8. What do you mean by Java packages? Explain it.
OR
Write any program in Java using concept of package.
9. What is exception handling in Java? Explain it with example.
OR
Write any program using exceptional handling in Java.
10. What do you mean by applet? Explain it.
OR
Write any program/ web page using concept of Applet.
11. What do you mean by multi-threading? Explain with suitable program.
OR
What
are the ways to create the thread. Explain any one method by relevant program.
*****
Thank you for visiting us, Hope you like our content
and its really helpful for you.
Do follow us for regular updates and if you want any specific help feel free to
ask on below.
Web Site: https://diplomaincs.in/
Contact Us: https://diplomaincs.in/contact-us
Follow us on below social handle:-
LinkedIn: https://www.linkedin.com/in/computer-scinece-and-engineering-diploma-b5917b3a1/
What’s App: https://whatsapp.com/channel/0029VaGwTZU1t90j9c1bKl0g
Facebook: https://www.facebook.com/Diploma.1234
PYQ Video References
No references available right now.
Comments & Reviews
Loading comments...