My Report

Java Programming Mock Test 5


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

Question 1 of 10

1. Which of these method returns a smallest whole number greater than or equal to variable X?

Question 1 of 10

Question 2 of 10

2. Which of these methods is used to know whether a string contains "true"?

Question 2 of 10

Question 3 of 10

3. Which of these class is necessary to implement datagrams?

Question 3 of 10

Question 4 of 10

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

 
    import java.net.*;
    class networking 
    {
        public static void main(String[] args) throws MalformedURLException 
        {
            URL obj = new URL("https://www.sanfoundry.com/javamcq");
            System.out.print(obj.getProtocol());
        }
    }

Question 4 of 10

Question 5 of 10

5. What will be the output of the following Java program?

 
    import java.net.*;
    class networking
    {
        public static void main(String[] args) throws MalformedURLException
        {
            URL obj = new URL("https://www.sanfoundry.com/javamcq");
            System.out.print(obj.toExternalForm());
        }
    }

Question 5 of 10

Question 6 of 10

6. Which of these methods is used to know host of an URL?

Question 6 of 10

Question 7 of 10

7. Which of these class contains all the methods present in Math class?

Question 7 of 10

Question 8 of 10

8. Which of these class is used to access actual bits or content information of a URL?

Question 8 of 10

Question 9 of 10

9. Which of these method converts radians to degrees?

Question 9 of 10

Question 10 of 10

10. Which of these process occur automatically by java run time system?

Question 10 of 10


 

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.