Font size
Worksheetsadvanced java
Total questions: 15
Worksheet time: 8mins
Kubernetes Networking:
Pick all the correct answers.
All Pods can communicate with All other Pods without using Network Address Translation (NAT).
All Nodes can communicate with all the Pods without NAT
The IP that is assigned to a Pod is the same IP the Pod sees itself as well as all other Pods in the cluster.
Routing is done by the L2 bridge
DNS deployed in Kubernetes Cluster is used for Service discovery and DNS Masq: adds DNS caching to Improve the performance
Docker Networking.
Pick all the correct answers.
Bridge Networking (Default)
Host (uses the Host Network Stack)
None (No Network Stack)
NAT is used for Node to Node Communication
Features of Pod Auto Scaler
Pick all the correct answers.
You can declare the Auto scaling requirements for every Deployment (Microservices).
Kubernetes will add Pods based on the CPU Utilization, no. of requests automatically.
Kubernetes Cloud infrastructure will automatically add Nodes if it ran out of available Nodes.
Auto scaler will not override the replicas in Deployment if the min replicas is greater than replicas in the Deployment.
What will be the output of the following Java code?
11
10
13
14
The process of hiding the implementation details from the user is called
Abstraction
Polymorphism
Inheritance
Encapsulation
Which of the following is a valid statement?
char[] c = new char();
char[] c = new char[5];
char[] c = new char(4);
char[] c = new char[];
Which is the fundamental unit of OOP?
Object
Class
Output of following Java Program?
10
20
Compilation Error
Run Time Error
What will be the output of the program?
int x, y;
x=15; y=20;
if (x>15)
if(y>15)
{
System.out.println("y is "+y);
}
else
System.out.println("x is "+x);
Error
y is 20
x is 15
No output
To create an object in java we use the keyword new.
True
False
Which is the correct way of knowing Array Size in Java?
int[] ary;
ary.length()
int[] ary;
ary.length
int[] ary;
ary->length()
int[] ary;
ary->length
Which of these is an incorrect Statement?
It is necessary to use new operator to initialize an array.
Array can be initialized using comma separated expressions surrounded by curly braces.
Array can be initialized when they are declared.
None of the mentioned
Which one of the following is a valid statement?
char[] c = new char();
char[] c = new char[5];
char[] c = new char(4);
char[] c = new char[];
The different between static and non static method is ....
for non static method : user need to create object in a class to call a method.
A method is to perform only specific task.
There is no significant differences between static and non - static method.
Both are bounded with a class.
What will be the output of the following Java code?
1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
i j k l m n o p q r
i i i i i i i i i i
