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

Q171.
What is the output of this program?
    class Output 
    {
         public static void main(String args[]) 
         {
             double x = 3.14;  
             int y = (int) Math.ceil(x);
             System.out.print(y);
         }
    }
Discuss
Answer: (d).4
Q172.
What is the output of this program?
    class Output 
    {
         public static void main(String args[]) 
         {
             double x = 3.14;  
             int y = (int) Math.floor(x);
             System.out.print(y);
         }
    }
Discuss
Answer: (b).3
Q173.
What is the output of this program?
    class Output 
    {
         public static void main(String args[])
         {
             char a[] = {'a', '5', 'A', ' '};   
             System.out.print(Character.isDigit(a[0])+ " ");
             System.out.print(Character.isWhitespace(a[3])+ " ");
             System.out.print(Character.isUpperCase(a[2]));
        }
    }
Discuss
Answer: (b).false true true
Q174.
What is the output of this program?
    class Output
    {
        public static void main(String args[])
        {
	    char a = (char) 98;
            a = Character.toUpperCase(a);
            System.out.print(a);
        }
    }

a.

b

b.

c

c.

B

d.

C

Discuss
Answer: (c).B
Q175.
What is the output of this program?
    class Output
    {
        public static void main(String args[])
        {
	    char a = '@';
            boolean x = Character.isLetter(a);
            System.out.print(x);
        }
    }
Discuss
Answer: (b).false
Q176.
What is the output of this program?
    class Output 
    {
        public static void main(String args[])
        {
	    String str = "true false";
            boolean x = Boolean.parseBoolean(str);
            System.out.print(x);
        }
    }
Discuss
Answer: (b).False
Q177.
What is the output of this program?
    class Output
    {
        public static void main(String args[]) 
        {
	   String x = Boolean.toString(false);
        }
    }
Discuss
Answer: (b).False
Q178.
What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            double x = 102;
            double y = 5;
            double z = Math.IEEEremainder(x, y);
            System.out.print(z);}
         }
    }

a.

0

b.

1

c.

2

d.

3

Discuss
Answer: (c).2
Q179.
Will this program generate same output is executed again?
    class Output 
    {
        public static void main(String args[]) 
        {
            int y = double z = Math.random();
            System.out.print(y);
        }
    }
Discuss
Answer: (b).No
Q180.
What is the output of this program?
    class newthread implements Runnable 
    {
	Thread t;
        newthread() 
        {
            t = new Thread(this,"My Thread");
            t.start();
	}
    }
    class multithreaded_programing 
    {
        public static void main(String args[]) 
        {
            new newthread();        
        }
    }
Discuss
Answer: (c).Compilation Error

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!