Aside from the Scanner class, which of the following classes can be used for text-file file input?
ObjectInputStream BufferedReader StringTokenizer None of these 2
Which of the following statements is true regarding Vectors with no specified base type?
A base type is needed because Java needs to know how to allocate memory. No base type is needed because Java will use the Object class as a base type. If a base type is not specified the code will not compile. No base type is needed because Vectors default to storing String objects. 2
A serializable class must implement the method(s) _________.
readObject and writeObject Either readObject or writeObject, or both, depending upon the desired behavior No need to implement any method None of the given option 3
You can ———to a network using sockets.
Read Write Read/Write None of these 3
Socket is a ————–communication channel between hosts.
Uni-directional
Question: Which of the following are passed as an argument to the paint ( ) method?
1: A Canvas object 2: A Graphics object 3: An Image object 4: A paint object Correct Answer: 2
Question: The code below draws a line. What color is the line? g.setColor(Color.red.green.yellow.red); g.drawLine(0, 0, 100,100);
1: Red 2: Green 3: Yellow 4: Black Correct Answer: 4
Question: To create DataBaseMetaData object we write following line of code
Question: What if the static modifier is removed from the signature of the main method?
1: The program does not compile 2: The program compiles but does not run 3: The program compiles and runs properly 4: The program throws an exception on compile time Correct Answer: 4
Question: What if the main method is declared as private?
1: The program does not compile… 2: The program compiles but does not run 3: The program compiles and runs properly 4: The program throws an exception on compile time Correct Answer: 2
Question: A member variable or method prefixed by the protected access modifier can be accessed:
1: Within the same class 2: Within the sub-class 3: Within the same package 4: All of the above Correct Answer: 4
Question: A top-level class without any modifier is accessible to
1: any class 2: any class within the same package 3: any class within the same file 4: any subclass of this class Correct Answer: 2
ENG502 midterm grand quiz solved spring2020 Click here to download the solution file from here. DOWNLOAD MOAZ PAST PAPERS SOLVED MOAZ PAST PAPERS MOAZ MIDTERM PAST PAPERS…
ENG519 midterm grand quiz solved spring2020 Click here to download the solution file from here. DOWNLOAD MOAZ PAST PAPERS SOLVED MOAZ PAST PAPERS MOAZ MIDTERM PAST PAPERS…
CS408 MidTerm MCQs With Refrence Solved By Arslan Click here to download the solution file from here. CS408 Human-Computer-Interaction Midterm MCQS Solved Click here to download the…