Page 358 - computer science (868) class 11
P. 358
case 3:
ob.editPrice();
ob.printRec();
break;
case 4:
ob.printReorder();
break;
case 5:
ob.delRec();
ob.printRec();
break;
default:
System.out.println("Exiting from system....Thank you");
}
}while(ch>=1 && ch<=5);
}
}
Unsolved Questions
A. Tick ( ) the correct option:
1. StringTokenizer class belongs to the ………………… package in Java.
a. java.io b. java.util
c. java.net d. java.lang
2. Which of the following methods is used to scan double type data in the Scanner class?
a. nextDouble() b. NextDouble()
c. nextdouble() d. nextUTF()
3. Which of the following is the default delimiter for StringTokenizer class?
a. Null b. White space
c. Escape sequence characters d. New line
4. In print() method, after printing cursor remains in the ………………… line.
a. different b. front
c. same d. back
5. Which of the following is the return type of hasMoreTokens() method in StringTokenizer class?
a. boolean b. int
c. String d. char
6. Data files are ………………… files.
a. executable b. non-executable
c. program d. All of these
7. FileOutputStream is a derived class of ………………… .
a. OutputStream b. DataOutputStream
c. File d. StreamIO
8. Which of the following methods is used to write int data to a binary file?
a. writeNum() b. writeint()
c. writeInteger() d. writeInt()
9. Which of the following exception is generated when we reach the end of file?
a. eofException b. EOFException
c. EFException d. FileNotFound
10. Which of the following writes a string to an output stream as a sequence of characters?
a. writeChar() b. writeChars()
c writeFloat() d. writeInt()
356356 Touchpad Computer Science-XI

