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
Basics in Java

Quiz
•
9th - 12th Grade
21 questions
Sains Komputer Tingkatan 4 : Struktur data & Modular

Quiz
•
9th - 12th Grade
19 questions
TechfestQuiz 2024

Quiz
•
9th - 12th Grade
15 questions
Quiz sull'Architettura del Calcolatore

Quiz
•
9th Grade - University
22 questions
C# Quiz

Quiz
•
9th - 12th Grade
20 questions
Java Casting & Booleans

Quiz
•
10th - 12th Grade
25 questions
Quiz informatica

Quiz
•
8th - 12th Grade
15 questions
Unit 9 2D Arrays Practice 1

Quiz
•
11th 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
9/11 Experience and Reflections

Interactive video
•
10th - 12th 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
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade