Shrimad Rajchandra Institute of Management & Computer 2015 Application 030010301-Java Programming Unit-1 Que: 1 State which of the following are true or false [1 marks each] 1. Is Java secure language? 2. Java is distributed language. 3. We can use java to develop web application only. 4. Standard edition, enterprise edition, and micro edition are the different addition of java. 5. To run a java program JVM need .class file and .java file. 6. Platform independent language can run on variety of CPU. True or False 7. main method is the entry point of java program. 8. It is possible to override main method in class. 9. final main method can be overloaded. 10. public is a valid keyword in Java. 11. User can create any number of classes in a single Java file. 12. Each class defined in Java is compiled into a separate class file whose name matches the class name. 13. A Single java file may contain any number of classes with the main method. 14. Applications are executed by using the class name that contains the applications main method 15. Command line arguments may be passed to the Java application, which are available in the main method using its String[] parameter 16. Java handles garbage collection automatically. 17. The size of int in Java is platform dependent. 18. It is possible to cast int into string? 19. JRE does not include Java compiler. Que: 3 Answer the following question in short 1. 2. 3. 4. 5. [1 marks each] Explain un-boxing. How can we say that java is architectural neutral? List all the key edition of java. What was the primary target application area Sun Microsystem had for creating Java? System.out.println(“hello”); Mr. Pratik Nayak Page 1 Shrimad Rajchandra Institute of Management & Computer 2015 Application 6. 7. 8. 9. What is the meaning of the above code? What is character encoding? State all graphic character available in Java. List out non graphic character In Java. What is boxing? Que: 4 Multiple type questions. [1 marks each] 1. Which one of these lists contains only Java programming language keywords? a. Class, if, void, long, Int, continue b. goto, instanceof, native, finally, default, throws c. try, virtual, throw, final, volatile, transient d. strictfp, constant, super, implements, do e. byte, break, assert, switch, include 2. Which is a reserved word in the Java programming language? a. method b. native c. subclasses d. reference e. array 3. Which is a valid keyword in java? a. interface b. string c. Float d. unsigned 4. Which of the following load class file? a. JRE b. JDK c. JVM d. JIT 5. Which of the following is virtual machine CPU that simulated by a program to run on actual CPU? a. JRE b. JDK Mr. Pratik Nayak Page 2 Shrimad Rajchandra Institute of Management & Computer 2015 Application c. JVM d. JIT 6. Which of following select the portion of byte code and compile into executable code in real time? a. JRE b. JDK c. JVM d. JIT 7. Which of following execute .class file? a. JRE b. JDK c. JVM d. JIT 8. Which of the following contain what all is needed to write and run Java program? a. JRE b. JDK c. JVM d. JIT 9. Which of the following provides a comprehensive environment for developing, testing and execute Java application? a. JDK b. IDE c. Notepad d. None of above 10. Which of the following is standard output stream? a. System.out. b. System.in c. Scanner d. println() 11. Which of the following application model facilitates the implementation of services as Mr. Pratik Nayak Page 3 Shrimad Rajchandra Institute of Management & Computer 2015 Application multitier application through well define component? a. J2ME b. J2SE c. J2EE d. JDK 12. Which of the following is not a graphic character a. Digit b. Symbol c. Enter d. Blank space 13. Which of the following is a graphic character? a. Symbol b. Enter c. Backspace d.Tab Que: 5 Answer the following question in short [2-3 marks each] 1. What is type conversion? 2. What is numeric promotion? 3. Explain Java standard edition. 4. Describe the executed of class file in JRE. 5. Explain the JVM with JRE. 6. What is Just- in-Time compiler? 7. List all the characteristic of Java. 8. What is different between platform independent and portable? 9. “Write once; run anywhere any time, forever.” – Justify. 10. How Java achieve security? 11. What are need of portability? 12. What is source code for compiler? 13. What are steps to compile Java class? 14. Write step to set environment variable on Windows XP. 15. Write a program to take command line input 16. What does public static void main (String []) mean? 17. Why are command line argument pass as String? 18. Why does not the main method throw an error with no argument? 19. Why do we only use main method to start a program? 20. main method can be overloaded – Justify. 21. List out IDEs commonly used for Java application Mr. Pratik Nayak Page 4 Shrimad Rajchandra Institute of Management & Computer 2015 Application 22. How to read data from keyboard? Explain with example. 23. How to write output on screen? Explain with example. 24. What are escape sequence and why they are needed? 25. What are identifiers and explain them with suitable examples? 26. Why count and Count are considered as different identifiers? 27. What are tokens? Explain with examples. 28. What are variables? List rules for variable naming in Java. 29. List out common ways to encode characters of Unicode Version 4.0. 30. List out the reserve keywords which are not use in Java. 31. List out the forms of floating point type in Java. 32. List out the rules to create Integer literal. 33. What is scalar variable? 34. List categories of operators supported by Java 35. What is binding? Explain types of binding supported in Java 36.What is operator precedence? Arrange the following operators in the order of their precedence : - , * , +,(),^,!,++,--,|,||,&,/,&& Que: 6 Answer the following question in details. [5 marks each] 1. 2. 3. 4. 5. 6. 7. 8. 9. Explain Role of JVM Explain Architecture of Java virtual machine (JVM) Explain JRE. Explain structure of Java program Explain Java program development life cycle Explain main three Java platforms. Explain Garbage collection heap of JVM What are the commands to run Java program? Write a program to calculate simple interest and display output in proper format. The program should accept inputs from keyboard. 10. Explain characteristic of Java. 11. Classified the literals. 12. What are data types? What are different data types supported in Java? 13. Write an interactive program to calculate sum, subtraction, division of 2 digit. 14. Find an interactive program to search largest and smallest digit. 15. Classified the operator by their category. 16. Explain with example how an instance becomes eligible for garbage collection. 17. How do we specify integer constants? Specify the three different ways of specifying an integer constant 18.What are two type of byte ordering? Explain difference between them. Mr. Pratik Nayak Page 5