adplus-dvertising

Welcome to the java lang and java io MCQs Page

Dive deep into the fascinating world of java lang and java io with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of java lang and java io, a crucial aspect of Java Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of java lang and java io, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Java Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through java lang and java io. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Java Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of java lang and java io. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

java lang and java io MCQs | Page 4 of 26

Q31.
Which of these class contains only floating point functions?
Discuss
Answer: (a).Math
Q32.
Which of these class encapsulate the runtime state of an object or an interface?
Discuss
Answer: (a).Class
Q33.
What is the value of “d” after this line of code has been executed?

double d = Math.round ( 2.5 + Math.random() );
Discuss
Answer: (b).3
Q34.
What is the output of this program?
    class Output 
    {
         public static void main(String args[]) 
         {
             int x = 3.14;  
             int y = (int) Math.abs(x);
             System.out.print(y);
         }
    }
Discuss
Answer: (b).3
Q35.
What is the output of this program?
    class Output 
    {
         public static void main(String args[]) 
        {
            double x = 3.1;  
            double y = 4.5;
            double z = Math.max( x, y );
            System.out.print(z);
        }
    }
Discuss
Answer: (d).4.5
Q36.
What is the output of this program?
    class Output 
    {
         public static void main(String args[]) 
        {
            double x = 2.0;  
            double y = 3.0;
            double z = Math.pow( x, y );
            System.out.print(z);
        }
    }
Discuss
Answer: (c).8.0
Q37.
Which of these exceptions is thrown by methods of System class?
Discuss
Answer: (c).SecurityException
Q38.
Which of these methods initiates garbage collection?
Discuss
Answer: (a).gc()
Q39.
Which of these methods loads the specified dynamic library?
Discuss
Answer: (a).load()
Q40.
Which of these method can set the out stream to OutputStream?
Discuss
Answer: (c).setOut()
Page 4 of 26

Suggested Topics

Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!