Algoritmi Java

Quiz
•
Computers
•
11th Grade
•
Hard
Andrea Accordino
Used 30+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Quale/i dei seguenti codici è corretto per visualizzare il contenuto del seguente array
int [] v = {2, 5, 7, 12, 1};
for(int i=0;i<v.length;i++)
System.out.println(v[i]);
for(int elem:v)
System.out.println(elem)
for(int=0;i<v.length();i++)
System.out.println(v[i];
Nessuna delle precedenti
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
quale soluzione è la dichiarazione di una costante di tipo int?
static final int NUM = 6;
static int NUM = 6;
static int NUM = 6;
static final int NUM 6;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cosa produce in output il seguente codice e perchè?
String s1=new String("Ciao mondo");
String s2=new String("Ciao mondo");
if(s1==s2)
System.out.print("True");
else
System.out.print("False");
True, perchè il contenuto delle due stringhe è uguale
False, perchè s2 è minore rispetto a s1
True, perchè viene confrontato il tipo delle due variabili
False, perchè vengono confrontati gli indirizzi e non il contenuto
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
come posso acquisire con il metodo scanner un solo carattere?
char c = sc.nextLine().charAt(0);
char c = sc.nextChar();
char c = sc.nextLine(0);
Nessuna delle precedenti
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
quali tra queste dichiarazioni di array sono sbagliate?
int Array[ ];
[ ] int array;
int [ ] array;
int array[];
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Quale tra le seguenti istruzioni è quella corretta per generare un numero intero compreso tra 0 e 50?
int n = (Math.random()* 51)
int n = (int) (Math.random()* 51);
int n = (int) Math.random()* 50;
int n = Math.random()* 50;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
La seguente riga di codice quale output produce?
int risultato = 5;
System.out.println("Il risultato e' "+risultato+1)
"Il risultato e' 5"
errore
"Il risultato e' 6"
"Il risultato e' 51"
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Programación con Java

Quiz
•
9th - 11th Grade
15 questions
Area and Arrays

Quiz
•
10th - 12th Grade
21 questions
SAINS KOMPUTER TINGKATAN 4 (BAB1)

Quiz
•
KG - University
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops

Quiz
•
9th Grade - University
20 questions
Java, part I

Quiz
•
11th Grade - University
15 questions
Java Script Quiz

Quiz
•
9th - 12th Grade
18 questions
STATIC KEYWORD IN JAVA

Quiz
•
9th - 12th Grade
15 questions
Array

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade