Test
Java Exam
Este test tiene tipos de pregunta que se abren en el reproductor de siempre.
Preguntas del test (19)
1What does HTML Stand For?
- AHyper Text Markup Language
- BHyper Transfer Markup List
- CHome Tool Mac List
- DHyperlinks and Text Markup Language
2Choose the appropriate data type for this value 5.5
- Aint
- Bdouble
- Cboolean
- DString
3Choose the appropriate data type for this field: isSwimmer
- Adouble
- Bboolean
- Cstring
- Dint
4How do you print out Hello World? [blank_start]_____[blank_end]
- ASystem.out.println("Helloworld");
5What is garbage collection in the context of java?
- AThe operating system periodically deletes all of the java files available on the system.
- BWhen all references to an object are gone, then the memory used by the object is automatically reclaimed
- CAny java package imported in a program and not being used, is automatically deleted.
- DThe java virtual machine (JVM) checks the output of any java program and deleted anything that does not make sense at all.
6What are loops used for?
- ATo run a piece of code only when a certain condition is met
- BTo run a piece of code repeatedly forever
- CTo run a piece of code repeatedly until a condition is met
- DTo run a piece of code if the condition isn't met
7How do you write a for loop?
- Afor (int i = 0; i < 21) {}
- Bfor (int i = 0; i < 21; i++) {}
- Cfor (int i = 0; i++) {}
- Dfor (= 0; i < 21; i++) {}
8Which is the right way to create an ArrayList of Integers?
- AArrayList<Integer> list = new ArrayList<Integer>;
- BArrayList Integer = New ArrayList();
- CArrayList<Integer> list = new ArrayList<Integer>();
- DInteger ArrayList = new Integer ArrayList();
9How do you add 21 to an ArrayList of Integers?
- Alist.add(21);
- B21.add(list);
- Clist.put(21);
- Dlist.add("21");
10Which is the right way to put 21 at the second position in the ArrayList of Integers?
(Remember zero-indexing)- Alist.put(2,21);
- Blist.add(2,21);
- Clist.add(1,21);
- Dlist.add(21,1);
11What is Object Oriented Programing (OOP)?
- AA programing model which is derived from structured programing or a series of computational steps to be carried out .
- BA programing model which is based upon the concept of objects. Objects contain data in the form attributes and the code form of methods.
- CA programming Paradigm in which we try to bind everything in pure mathematical functions style. It is a declarative type of programing style.
- DIt is equivalent to a function, they are actions that perform operations on a variable. It accepts parameters as arguments, manipulates these and then produces an output when it is called on and object.
12What is the Syntax for creating a Scanner object named input? [blank_start]____[blank_end]
- AScanner input = new Scanner (System.in);
13Declare and initialize a variable called num1 as a whole number datatype with the value of 25. [blank_start]____[blank_end]
- Aint num1 = 25;
14How do you get the third element of an ArrayList?
- Alist.find(2);
- Blist.find(3);
- Clist.get(3);
- Dlist.get(2);
15How do you write a for each loop that iterates through an ArrayList of Strings?
- Afor each (Strings s in list){}
- Bfor each (String s : list){}
- Cfor (String s : list){}
- Dfor (Integer i : list){}
16What does a HashMap store?
- AValues
- BKeys
- CKeys and Values
- DStrings
17How do you create a HashMap with Strings as keys and Integers as Values?
- AHashMap<String, Integer> map = new HashMap<String, Integer>();
- BHashMap<Integer, String> map = new HashMap<Integer, String>();
- CHashMap<String> mao = new HashMap<Integer>();
- DHashMap map = new HashMap(String, Integer);
18How do you add an element to a HashMap with String keys and Integer values?
- Amap.put(Stuff,123);
- Bmap.put("Stuff", 123);
- Cmap.add("Stuff" , 123);
- Dmap.add(Stuff ,123)
19How do you iterate through a HashMap using a for each loop?
- Afor each (String key : map.keySet()) {}
- Bfor (String key : map) {}
- Cfor each (String key : map) {}
- Dfor (String key : map.keySet()) {}
Información
- Descripción
- Software Developer Java Test sobre Java Exam, creado por Anthony Wright el 12/09/2022.
- Autor
- Anthony Wright
- Idioma
- English
- Visitas
- 0
- Historial
- Creado el 12 sep 2022 · actualizado el 13 sep 2022
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test