adplus-dvertising

Welcome to the IO and Applets MCQs Page

Dive deep into the fascinating world of IO and Applets with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of IO and Applets, a crucial aspect of Java Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of IO and Applets, 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 IO and Applets. 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 IO and Applets. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

IO and Applets MCQs | Page 1 of 6

Discuss
Answer: (c).Abstract Window Toolkit
Q2.
Which of these is used to perform all input & output operations in Java?
Discuss
Answer: (a).streams
Q3.
Which of these is a type of stream in Java?
Discuss
Answer: (c).Byte stream
Q4.
Which of these classes are used by character streams for input and output operations?
Discuss
Answer: (b).Writer
Q5.
Which of these class is used to read from byte array?
Discuss
Answer: (d).ByteArrayInputStream
Q6.
What is the output of this program if input given is ‘abcqfghqbcd’?
    class Input_Output
    {
        public static void main(String args[]) throws IOException
        {  
            char c;
            BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
            do
            {
                c = (char) obj.read();
         System.out.print(c);
            } while(c != 'q');
        }
    }
Discuss
Answer: (c).abcq
Q7.
What is the output of this program if input given is “abc’def/’egh”?
    class Input_Output
    {
        public static void main(String args[]) throws IOException
        {  
            char c;
            BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
            do 
            {
                c = (char) obj.read();
         System.out.print(c);
            } while(c!='\'');
        }
    }
Discuss
Answer: (a).abc’
Q8.
What is the output of this program?
    class output
    {
        public static void main(String args[])
        { 
             StringBuffer c = new StringBuffer("Hello");
             System.out.println(c.length());
        }
    }

a.

4

b.

5

c.

6

d.

7

Discuss
Answer: (b).5
Q9.
Which exception is thrown by read() method?
Discuss
Answer: (a).IOException
Q10.
Which of these is used to read a string from the input stream?
Discuss
Answer: (c).read()
Page 1 of 6

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!