What are the types of cache in Hibernate?
When the instance of thread is created it will be in ____state.
In what way(s) we can do synchronization in java?
Which of these are integer constants of the ComponentEvent class?
Which of these is a valid declaration of the object of class Apple
//Topic:- Type Casting
class abekus {
public static void main (String[] args) {
long mylong=5.023;
double mydouble= mylong;
System.out.println(mydouble);
}
}
public interface itf
{
int i=12;
}
public class test
{
public static void main(String args[])
{
itf.i=20;
System.out.println(itf.i);
}
}
class abekus {
public static void main (String[] args) {
int a=50,b=70,c=65;
if((a>c) && (++b>c)){
System.out.println("Inside if block");
}
else
System.out.println("Outside if block");
}
}
What will be the output of the following Java code?
import java.net.*;
class Networking
{
public static void main(String[] args) throws MalformedURLException
{
URL obj = new URL("https://www.abekus.com/javamcq");
System.out.print(obj.getProtocol());
}
}
What will be the output of the following Java program?
import java.io.*;
class Chararrayinput
{
public static void main(String[] args)
{
String obj = "abcdef";
int length = obj.length();
char c[] = new char[length];
obj.getChars(0, length, c, 0);
CharArrayReader input1 = new CharArrayReader(c);
CharArrayReader input2 = new CharArrayReader(c, 0, 3);
int i;
try
{
while ((i = input1.read()) != -1)
{
System.out.print((char)i);
}
}
catch (IOException e)
{
e.printStackTrace();
}
}
}