My Report

Java Programming Practice Test 4


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Where is String Pool stored?

2. Does code Segment loads the java code?

3. Which of these exceptions will be thrown if we declare an array with negative size?

4. Which of these classes is used for input and output operation when working with bytes?

5. Classes and Methods are stored in which space?

6. Which of these class is used to read and write bytes in a file?

7. Which of these is a super class of wrappers Byte and short wrappers?

8. Which of these classes can return more than one character to be returned to input stream?

9. What will be the output of the following Java code?

 
    class output 
    {
        public static void main(String args[])
        {
           StringBuffer s1 = new StringBuffer("Hello World");
           s1.insert(6 , "Good ");
           System.out.println(s1);
        }
   }

10. What will be the output of the following Java code?

   
    class Output 
    {
        public static void main(String args[])
        {
            Double i = new Double(257.5);  
            boolean x = i.isNaN();
            System.out.print(x);
        }
    }

 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.