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 6 of 6

Q51.
What will be output for the following code?
 import java.awt.*;
    import java.applet.*;
    public class myapplet extends Applet
    {
        public void paint(Graphics g)
        {
            g.drawString(""A Simple Applet"", 20, 20);    
        }
    }
Discuss
Answer: (a).A Simple Applet
Q52.
Java I/O is used to process the?
Discuss
Answer: (c).both a and b
Q53.
Can we perform file handling in Java by Java I/O API?
Discuss
Answer: (a).Yes
Q54.
In java, how many streams are created for us automatically?

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (b).3
Discuss
Answer: (a).public void write(int)throws IOException
Discuss
Answer: (b).public void write(byte[])throws IOException
Q57.
ObjectFilter is a member of java.io package.
Discuss
Answer: (b).False
Q58.
___________ returns true if called on a file and returns false when called on a directory.
Discuss
Answer: (c).isFile()
Q59.
What will be output for the following code?
    import java.io.*;
    class files 
    {
        public static void main(String args[]) 
        {
            File obj = new File(""/java/system"");
            System.out.print(obj.getName());
        }
    }
Discuss
Answer: (b).system
Q60.
What will be output for the following code?
Note: file is made in c drive.
import java.io.*;
    class files 
    {
        public static void main(String args[]) 
        {
            File obj = new File(""/java/system"");
            System.out.print(obj.canWrite());
            System.out.print("" "" + obj.canRead());
        }
    }
Discuss
Answer: (d).false false
Page 6 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!