Java Base
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Ilaria Bertoletti
Used 47+ times
FREE Resource
19 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Dato il seguente codice:
int a =Integer.parseInt(s);
Quali/e affermazioni/e sono/è corretta?
int è il tipo primitivo
Integer è la wrapper class
L'istruzione è errata e si risolve correttamente con il cast esplicito
int a = (int)s
Nessuna delle precedenti
2.
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
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Per rappresentare i numeri in virgola mobile in Java il default è
float
non c'è nessun default
double
int
4.
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;
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Quali modi sono corretti per dichiarare una variabile di tipo reale?
float num = 14.9f;
float num = 14.9;
float num;
double num = 14.9d;
6.
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
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Come posso acquisire un solo carattere utilizzando la classe Scanner?
char c = sc.nextLine().charAt(0);
char c = sc.nextChar();
char c = sc.nextLine(0);
Nessuna delle precedenti
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
19 questions
Python Year 9 Quiz
Quiz
•
8th - 10th Grade
20 questions
JAVA FUNDAMENTALS
Quiz
•
9th - 12th Grade
20 questions
Compito Excel No SE
Quiz
•
12th Grade
15 questions
Física I - Robótica 20/04
Quiz
•
11th Grade
20 questions
X-Flowchart, Variabel, dan Tipe Data
Quiz
•
10th Grade
20 questions
Arrays in Java
Quiz
•
9th - 12th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
22 questions
Online Essentials
Quiz
•
12th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
