--Your friends at LectureNotes

Previous Year Exam Questions for Java Programming - JAVA of 2017 - bput by Verified Writer

  • Java Programming - JAVA
  • 2017
  • PYQ
  • Biju Patnaik University of Technology Rourkela Odisha - BPUT
  • Electronics and Communication Engineering
  • B.Tech
  • 79 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Registration No: Total Number of Pages: 03 B.Tech. PET5H001 5th Semester Regular Examination 2017-18 Java Programming BRANCH:ECE/ETC Time: 3 Hours Max Marks: 100 Q.CODE: B451 Answer Question No.1 and 2 which are compulsory and any four from the rest. The figures in the right hand margin indicate marks. Q1 a) b) c) d) e) Answer the following questions: multiple type or dash fill up type Give the Output for the following program? class Char { public static void main(String args[]) { char ch1, ch2; ch1 = 88; ch2 = 'Y'; System.out.print("ch1 and ch2: "); System.out.println(ch1 + " " + ch2); } } a. ch1 and ch2: X Y b. ch1 and ch2: x y c. ch1 and ch2: 1 3 d. None of the above What will happen if we call the run() method directly instead of calling the start() method? a. Each thread starts in a separate call stack. b. Invoking the run() method from main thread, the run() method goes onto the current call stack rather than at the beginning of a new call stack. c. Both A & B d. None of the above What is the disadvantage of Garbage Collection? a. It makes java memory efficient because garbage collector removes the unreferenced objects from heap memory b. It is automatically done by the garbage collector so we don't need to make extra efforts c. None of the above Applet class is a subclass of the panel class, which is again a subclass of the....................... class. a. object b. component c. awt d. container Which is a superclass of all exception classes? a. Throwable b. Exception c. RuntimeException d. IOException (2 x 10)

Text from page-2

f) g) h) i) j) Q2 Which method of string class in java is used to convert the boolean into String? a. public static String valueOf(double I) b. public static String valueOf(boolean I) c. public boolean equals(Object anObject) d. public static String valueOf(Object obj) Which statements about JDBC are true? a. JDBC is an API to connect to relational-, object- and XML data sources b. JDBC stands for Java DataBase Connectivity c. JDBC is an API to access relational databases, d. JDBC is an API to bridge the object-relational mismatch between OO programs and relational databases Which method of URL class represents a URL and it has complete set of methods to manipulate URL in Java? a. java.net.URL b. java.net.URLConnection c. Both A & B d. None of the above What does the java.net.InetAddress class represent? a. Socket b. IP Address c. Protocol d. MAC Address Which method is used to change the name of a thread? a. public String getName() b. public void setName(String name) c. public void getName() d. public String setName(String name) (2 x 10) a) b) c) d) e) f) g) h) i) j) Answer the following questions: Short answer type What is java components? What is method overloading? What is inheritance and what are its advantages? Why wait(), notify() and notifyAll() are not inside thread class? What is the differences between throw and throws in java exception handling? Mentioned the subclasses of AWT event class. What is a string buffer class and how does it differ from string class? What is the role of driver manager class? What is the difference between an applet and java application? What is the difference in paint and repaint in java swing? Q3 a) b) List the important characteristics of java language. Write a java program to compute the sum of digits of a given number. (10) (5) Q4 a) b) What is inheritance? Explain with examples? What are access specifiers? Discuss them in the context of java. (10) (5)

Text from page-3

Q5 a) What is multithreading? What are the methods available in Java for interthread communication? Discuss with an example. Write a note on thread synchronization. (10) (10) b) What happens when an exception occurs within a method? Explain the exception handling mechanism in java. Describe various operators used in java with their classifications. Q7 a) b) Write a java program for Applet to create calculator. Explain the architecture of Remote method invocation(RMI). (10) (5) Q8 a) Distinguish between : (a) File reader and File writer (b) Output stream and Input stream Write a program to implement TCP/UDP client server architecture program. (10) Write a program to create a GUI for website for user registration form in swings. Define package? Create a package with the name with the power that can used to calculate the power of a number? (10) b) Q6 a) b) Q9 a) b) (5) (5) (5) (5)

Lecture Notes