which of the following Exception is thrown by Jvm when code uses negative size while initializing an array
Anonymous Quiz
25%
NullPointerException
12%
NumberFormatException
25%
IllegalArgumentException
37%
NegativeArraySizeException
public class Program
{
int i;
int j;
int k;
Program(){
j=2;
}
Program(int m,int n){
super();
i=m;
k=n;
}
Program(int x){
super();
j=x;
}
public static void main(String[] args) {
Program p=new Program(4);
System.out.println(p.i+" "+p.j+" "+p.k);
}
}
{
int i;
int j;
int k;
Program(){
j=2;
}
Program(int m,int n){
super();
i=m;
k=n;
}
Program(int x){
super();
j=x;
}
public static void main(String[] args) {
Program p=new Program(4);
System.out.println(p.i+" "+p.j+" "+p.k);
}
}
Which of the below is bidirectional cursor in Collection (JAVA)?
Anonymous Quiz
6%
Iterator
23%
Enumeration
44%
ListIterator
27%
All the above
Q. You want subclasses in any package to have access to members of a superclass. which is the most restrictive that accomplishes this objective?
Anonymous Quiz
25%
Private
39%
Public
10%
Transient
25%
Protected
What is a CV? CV vs Résumé + Curriculum Vitae Meaning
https://www.freecodecamp.org/news/what-is-a-cv-and-how-is-it-different-from-a-resume/
https://www.freecodecamp.org/news/what-is-a-cv-and-how-is-it-different-from-a-resume/
freeCodeCamp.org
What is a CV? CV vs Résumé + Curriculum Vitae Meaning
Depending on where you live and the field you're in, you've probably heard the terms "résumé" and "curriculum vitae" or "CV". And you might be wondering – are they the same thing? Are these terms interchangeable? Well, the answer isn't a simple yes or no.…
Q. If an unique key constraint on DATE column is created will it accept the rows that are inserted with SYSDATE?
Anonymous Quiz
59%
Will
41%
Won't
What is the Result of the following 'VIK'||NULL||'RAM' ?
Anonymous Quiz
19%
Error
19%
NULL
37%
VIKRAM
24%
VIK RAM
public class Main
{
public static void main(String[] args) {
int num1,num2;
try{
num1=0;
num2=62/num1;
System.out.println("Try block message");
System.exit(0);
}catch(ArithmeticException e){
System.out.println("Error: Don't divide a Number of num1");
System.exit(0);
}
finally{
System.out.println("Give another number of num1");
}
}
}
{
public static void main(String[] args) {
int num1,num2;
try{
num1=0;
num2=62/num1;
System.out.println("Try block message");
System.exit(0);
}catch(ArithmeticException e){
System.out.println("Error: Don't divide a Number of num1");
System.exit(0);
}
finally{
System.out.println("Give another number of num1");
}
}
}
public class Main
{
static final Integer i1=1;
final Integer i2=2;
Integer i3=3;
public static void main(String[] args) {
final Integer i4=4;
Integer i5=5;
class Inner{
final Integer i6=6;
Integer i7=7;
Inner(){
System.out.println(i6+i7);
}
}
}
}
{
static final Integer i1=1;
final Integer i2=2;
Integer i3=3;
public static void main(String[] args) {
final Integer i4=4;
Integer i5=5;
class Inner{
final Integer i6=6;
Integer i7=7;
Inner(){
System.out.println(i6+i7);
}
}
}
}
public class Main
{
public static void main(String[] args) {
String s1="JAVA";
StringBuilder s2=new StringBuilder(s1);
System.out.println(s1.compareTo(s2)==s2.compareTo(s1));
}
}
{
public static void main(String[] args) {
String s1="JAVA";
StringBuilder s2=new StringBuilder(s1);
System.out.println(s1.compareTo(s2)==s2.compareTo(s1));
}
}
public class Main
{
public static void main(String[] args) {
int i=0;
addTwo(i++);
System.out.println(i);
}
static void addTwo(int i){
i+=2;
}
}
{
public static void main(String[] args) {
int i=0;
addTwo(i++);
System.out.println(i);
}
static void addTwo(int i){
i+=2;
}
}
public enum TrafficLight
{
RED("Stop"),YELLOW("Caution"),GREEN("Go");
private String action;
TrafficLight(String action){
this.action=action;
}
public static void main(String[] args) {
TrafficLight green=new TrafficLight("Go");
System.out.println(GREEN.equals("green"));
}
}
{
RED("Stop"),YELLOW("Caution"),GREEN("Go");
private String action;
TrafficLight(String action){
this.action=action;
}
public static void main(String[] args) {
TrafficLight green=new TrafficLight("Go");
System.out.println(GREEN.equals("green"));
}
}
import java.util.*;
public class Main
{
public static void main(String[] args) {
Collection<String> words=new ArrayList();
words.add("Don't");
words.add("change");
words.add("me!");
System.out.println("Before : "+words);
for(String word:words){
System.out.print(word.toUpperCase()+"_");
}
System.out.println();
System.out.println("After : "+words);
}
}
public class Main
{
public static void main(String[] args) {
Collection<String> words=new ArrayList();
words.add("Don't");
words.add("change");
words.add("me!");
System.out.println("Before : "+words);
for(String word:words){
System.out.print(word.toUpperCase()+"_");
}
System.out.println();
System.out.println("After : "+words);
}
}