Can we create an object at run time
Arrays in java are implemented as an object
What will be the return type of 'void' method?
What are the main uses of the this
keyword?
class test{
public static void main (String[] args) {
char a;
int j;
a='A';
j=a;
a=(char)j+1;
a++;
System.out.println(a);
}
}
what should be the output of this code block?
interface A {
void show();
}
class B implements A {
public void show() {
System.out.println("Welcome To abekus.com");
}
}
public class Main {
public static void main(String[] args) {
A obj = new B();
obj.show();
}
}
What will be the output of the following Java code?
class Abekus {
public static void main(String args[]) {
char arr[] = new char[10];
for (int i = 0; i < 10; ++i) {
arr[i] = 'i';
System.out.print(arr[i] + "");
}
}
}
Predict the output of the following Java code:
class Abekus implements Runnable {
public void run()
{
System.out.println("Code Run");
}
} class AbekusMain {
public static void main(String[] args)
{
Thread t1 = new Thread();
t1.start();
System.out.println("Main code run");
}
}
Statement 1- Abstraction is the concept of defining real-world objects in terms of classes or interfaces.
Statement 2- Polymorphism is the concept of defining real-world objects in terms of classes or interfaces.
Statement 3- Inheritance is the concept of defining real-world objects in terms of classes or interfaces.
Statement 4- Data Abstraction is the concept of defining real-world objects in terms of classes or interfaces.