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
Similar Resources on Wayground
20 questions
Nozioni fondamentali dell'Informatica

Quiz
•
8th Grade - University
20 questions
S.O.

Quiz
•
9th Grade - University
18 questions
Compito Hardware & Software

Quiz
•
12th Grade
16 questions
Scorciatoie Tastiera & Estensioni

Quiz
•
10th Grade
20 questions
Compito Excel No SE

Quiz
•
12th Grade
20 questions
Il processore 8086

Quiz
•
11th - 12th Grade
15 questions
Matrici A

Quiz
•
11th Grade
15 questions
Software

Quiz
•
8th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade