47. How many numeric data types are supported in Java?
Ans: 6
48. java.exe can be found at which 2 places in JDK directory?
Ans: JAVA_HOME\jre\bin
49. public void write(int b) of FileOutputStream implements the write method of OutputStream
Ans: True
50. The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file?
Ans: True
51. Arrays when passed to a method they are always passed by refernce. Is this true or false?
Ans: True
52. JVM is available for:
Ans: All popular Operating Systems
53. Which of these can be thrown using the throw statement?
Ans: All the above (a) Error, b) Throwable, c) Exception)
54. Which of the following is the data query statement in QUEL?
Ans: SELECT
55. How many techniques are used in Session Tracking?
Ans: 4.0
56. is write() method in BufferedWriter class overloaded?
Ans: True
57. Fork is
Ans: The creation of a new process
58. JDK7 introduced a new version of try statement known as____
Ans: try-with-resources statement
59. How many parameter does the readBoolean() of DataInputStream accepts?
Ans: 0
60. Java is a______independent language
Ans: Platform
61. What is the return type of close() method in BufferdReader class?
Ans: void
62. What is the output of the code
public class test{
public static void main(String args[]){
int i=1,j=1;
try{
i++;
j--;
if(i/j>1)
i++;
}
catch(ArithmeticException e){
System.out.println(0);
}
catch(ArrayIndexOutOfBoundsException e){
System.out.println(1);
}
catch(Exception e){
System.out.println(2);
}
finally{
System.out.println(3);
}
System.out.println(4);
}
}
Ans: 0,3,4
63. A file containing relatively permanent data is
Ans: Master File
64. Which of the following are the five built-in functions provided by SQL?
Ans: COUNT, SUM, AVG, MAX, MIN
65. It is a good practice to put the cleanup code(like closing Connection or PrintWriter object) in______block, even when no exceptions are anticipated.
Ans: finally
66. Which life cycle method make ready the servlet for garbage collection
Ans: destroy
67. reset() have boolean return type in BufferedReader class
Ans: True
68. Subclass of Writer class is?
Ans: StringWriter
69. Development tools are
Ans: Both A and B ( a) compiler, b) java application launcher )
70. The expected signature of the main method is public static void main(). What happens if we make a mistake and forget to put the static keyword? Assume that we are executing using command prompt.
Ans: The JVM fails at runtime with NoSuchMethodError
71. Which of these class is used to read characters in a file?
Ans: FileReader
Thanks for sharing this informative content , Great work
ReplyDeleteLeanpitch provides online training in Product prototyping during this lockdown period everyone can use it wisely.
icp-cat training