a) Young b) Old c) Permanent d) Temporary Answer: ...
View QuestionWhich class loader loads jar files from JDK directory?
a) Bootstrap b) Extension c) System d) Heap Answer: b
View QuestionWhich one of the following is a class loader?
a) Bootstrap b) Compiler c) Heap d) Interpreter Answer: a Explanation: Bootstrap is a class ...
View QuestionWhat is JVM?
a) Bootstrap b) Interpreter c) Extension d) Compiler Answer: b Explanation: JVM is Interpreter. ...
View QuestionDoes code Segment loads the java code?
a) true b) false Answer: a Explanation: Code Segment loads compiled java bytecode. Bytecode is platform ...
View QuestionWhich of the following is not a segment of memory in java?
a) Stack Segment b) Heap Segment c) ...
View Question
What will be the output of the following Java program?
import java.io.*;
public class filesinputoutput
{
public static void main(String[] args)
{
String obj = “abc”;
byte b[] = obj.getBytes();
ByteArrayInputStream obj1 = new ByteArrayInputStream(b);
for (int i = 0; i < 2; ++ i)
{
int c;
while ((c = obj1.read()) != -1)
{
if (i == 0)
{
System.out.print(Character.toUpperCase((char)c));
obj2.write(1);
}
}
System.out.print(obj2);
}
}
}
What will be the output of the following Java program? import java.io.*; ...
View Question
What will be the output of the following Java program?
import java.io.*;
public class filesinputoutput
{
public static void main(String[] args)
{
String obj = “abc”;
byte b[] = obj.getBytes();
ByteArrayInputStream obj1 = new ByteArrayInputStream(b);
for (int i = 0; i < 2; ++ i)
{
int c;
while ((c = obj1.read()) != -1)
{
if (i == 0)
{
System.out.print(Character.toUpperCase((char)c));
}
}
}
}
}
What will be the output of the following Java program? import java.io.*; ...
View Question
What will be the output of the following Java program?
import java.io.*;
public class filesinputoutput
{
public static void main(String[] args)
{
String obj = “abc”;
byte b[] = obj.getBytes();
ByteArrayInputStream obj1 = new ByteArrayInputStream(b);
for (int i = 0; i < 2; ++ i)
{
int c;
while ((c = obj1.read()) != -1)
{
if(i == 0)
{
System.out.print((char)c);
}
}
}
}
}
What will be the output of the following Java program? import java.io.*; ...
View QuestionWhich of these method(s) is/are used for writing bytes to an outputstream?
a) put() b) print() and write() c) printf() d) write() and read() Answer: b Explanation: print() and write()
View Question