java assets quiz that helps, Cheat Sheet of Law

java assets quiz that helps out

Typology: Cheat Sheet

Pre 2010

Uploaded on 05/23/2024

unknown user
unknown user 🇪🇬

2 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
ArrayList<String>Q=new ArrayList<>();
ArrayList<Integer>ans=new ArrayList<>();
int marks=0;
Q.add("Number of primitive data types in Java are?");
Q.add("6");
Q.add("7");
Q.add("8");
Q.add("9");
ans.add(3);
Q.add("What is the size of float and double in java?");
Q.add("32&64");
Q.add("32&32");
Q.add("64&64");
Q.add("64&32");
ans.add(1);
Q.add(" Automatic type conversion is possible in which of the possible cases?");
Q.add("Byte to Int");
Q.add("Int to Long");
Q.add("Long to Int");
Q.add("Short to Int");
ans.add(2);
Q.add("When an array is passed to a method, what does the method receive?");
Q.add("The reference of the Array");
Q.add("A copy of the Array");
Q.add("Length of the Array");
Q.add("copy of The First Array");
ans.add(1);
Q.add("Identify the keyword among the following that makes a variable belong to a
class,rather than being defined for each instance of the class.");
Q.add("final");
Q.add("static");
Q.add("volatile");
Q.add("abstract");
ans.add(2);
Q.add("compareTo() returns ?");
Q.add("True");
Q.add("false");
Q.add("An int value");
Q.add("None");
ans.add(3);
Q.add("Total constructor string class have?");
Q.add("3");
Q.add("7");
Q.add("13");
Q.add("20");
ans.add(3);
pf3
pf4

Partial preview of the text

Download java assets quiz that helps and more Cheat Sheet Law in PDF only on Docsity!

import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); ArrayListQ=new ArrayList<>(); ArrayListans=new ArrayList<>(); int marks=0; Q.add("Number of primitive data types in Java are?"); Q.add("6"); Q.add("7"); Q.add("8"); Q.add("9"); ans.add(3); Q.add("What is the size of float and double in java?"); Q.add("32&64"); Q.add("32&32"); Q.add("64&64"); Q.add("64&32"); ans.add(1); Q.add(" Automatic type conversion is possible in which of the possible cases?"); Q.add("Byte to Int"); Q.add("Int to Long"); Q.add("Long to Int"); Q.add("Short to Int"); ans.add(2); Q.add("When an array is passed to a method, what does the method receive?"); Q.add("The reference of the Array"); Q.add("A copy of the Array"); Q.add("Length of the Array"); Q.add("copy of The First Array"); ans.add(1); Q.add("Identify the keyword among the following that makes a variable belong to a class,rather than being defined for each instance of the class."); Q.add("final"); Q.add("static"); Q.add("volatile"); Q.add("abstract"); ans.add(2); Q.add("compareTo() returns ?"); Q.add("True"); Q.add("false"); Q.add("An int value"); Q.add("None"); ans.add(3); Q.add("Total constructor string class have?"); Q.add("3"); Q.add("7"); Q.add("13"); Q.add("20"); ans.add(3);