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
Flowgorithm - con struttura iterativa

Quiz
•
9th - 12th Grade
15 questions
Quiz su SO e SW applicativo

Quiz
•
12th Grade
15 questions
Hardware_Parte 2

Quiz
•
9th Grade - University
15 questions
Il Sistema Operativo

Quiz
•
9th - 12th Grade
20 questions
Java

Quiz
•
11th Grade
20 questions
I sottoprogrammi in C

Quiz
•
10th - 12th Grade
15 questions
La shell di Linux

Quiz
•
9th - 12th Grade
20 questions
Software e Sistemi Operativi di un computer

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

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

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade