466). Which of these packages contain classes and interfaces used for input & output operations of a program?

[A]java.util
[B]java.lang
[C]java.io
[D]all of the mentioned

Show Answer

469). Which of these class is not related to input and output stream in terms of functioning?

[A]File
[B]Writer
[C]InputStream
[D]Reader

Show Answer

471). Which of these is method for testing whether the specified element is a file or a directory?

[A]IsFile()
[B] isFile()
[C]Isfile()
[D] isfile()

Show Answer

472). What will be the output of the following Java code?
    import java.io.*;
    class files 
    {
        public static void main(String args[]) 
        {
            File obj = new File("/java/system");
            System.out.print(obj.getName());
        }
    }

[A]java
[B]system
[C]java/system
[D]/java/system

Show Answer

473). What will be the output of the following Java program? (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.getAbsolutePath());
        }
    }

[A]java
[B]system
[C] java/system
[D]\java\system

Show Answer

474). What will be the output of the following Java program? (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());
        }
    }

[A]true false
[B] false true
[C]true true
[D]false false

Show Answer

475). What will be the output of the following Java program? (Note: file is made in c drive.) What will be the output of the following Java program? (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.getParent());
            System.out.print(" " + obj.isFile());
        }
    }

[A]java true
[B] java false
[C] \java false
[D] \java true

Show Answer