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 3 of 26

Q21.
Standard output variable ‘out’ is defined in which class?
Discuss
Answer: (d).System
Q22.
Which of these class can encapsulate an entire executing program?
Discuss
Answer: (b).Process
Q23.
Which of the following is method of System class is used to find how long a program takes to execute?
Discuss
Answer: (c).currentTimeMillis()
Q24.
Which of these class holds a collection of static methods and variables?
Discuss
Answer: (d).System
Q25.
What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            long start, end;   
            start = System.currentTimeMillis();
            for (int i = 0; i < 10000000; i++);
            end = System.currentTimeMillis();
            System.out.print(end - start);
        }
    }
Discuss
Answer: (d).System Dependent
Q26.
What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            byte a[] = { 65, 66, 67, 68, 69, 70 };
            byte b[] = { 71, 72, 73, 74, 75, 76 };  
            System.arraycopy(a , 0, b, 0, a.length);
            System.out.print(new String(a) + " " + new String(b));
        }
    }
Discuss
Answer: (a).ABCDEF ABCDEF
Q27.
Which of these class is a superclass of all other classes?
Discuss
Answer: (d).Object
Q28.
Which of these method of Object class can generate duplicate copy of the object on which it is called?
Discuss
Answer: (a).clone()
Q29.
What is the value of double consonant ‘E’ defined in Math class?
Discuss
Answer: (c).approximately 2.72
Q30.
Which of these method is a rounding function of Math class?
Discuss
Answer: (d).all of the mentioned
Page 3 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!