Passaggio parametri

Quiz
•
Computers
•
University
•
Medium

Stefano Marcugini
Used 12+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 1 pt
dato il metodo:
static int conta (int a, int b) {...}
e la sua chiamata nel main:
int c = 0;
int d = conta(c,3+4);
I parametri formali sono:
a
b
c
d
3+4
2.
MULTIPLE SELECT QUESTION
1 min • 1 pt
dato il metodo:
static int conta (int a, int b) {...}
e la sua chiamata nel main:
int c = 0;
int d = conta(c,3+4);
I parametri attuali sono:
a
b
c
d
3+4
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Sintatticamente i parametri formali sono:
variabili
espressioni
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Sintatticamente i parametri attuali sono:
variabili
espressioni
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
cosa stampa il seguente frammento di codice?
static void conta (int c, int d, int e)
{int a =5;int b=4;
if (a>b) return e; else return d;}
public static void main(String[] args) {
int a=1; int b=5; int c=3;
System.Out.println(conta(a,b,c));
}
1
3
5
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
cosa stampa il seguente programma?
static void scambia1(int i, int j) {
int temp = i;
i = j;
j = temp;}
public static void main(String[] args) {
int p = 5; int s = 7;
scambia1(p,s);
System.out.println( p + ", " + s ); }
5, 7
7, 5
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
cosa stampa il seguente programma?
static void vernicia(Motocicletta m, String c) {
m.colore = c; }
public static void main(String[] args) {
Motocicletta m = new Motocicletta("Ducati", "bianco");
vernicia(m,"rosso");
System.out.println(m.colore); }
bianco
rosso
lancia NullPointerException
8.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
cosa stampa il seguente programma?
static void vernicia(Motocicletta m, String c) {
m = new Motocicletta(" "," ");
m.colore = c; }
public static void main(String[] args) {
Motocicletta m = new Motocicletta("Ducati", "bianco");
vernicia(m,"rosso");
System.out.println(m.colore); }
bianco
rosso
lancia NullPointerException
9.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
cosa stampa il seguente programma?
static void vernicia(Motocicletta m, String c) {
m.colore = c;
m = null; }
public static void main(String[] args) {
Motocicletta m = new Motocicletta("Ducati", "bianco");
vernicia(m,"rosso");
System.out.println(m.colore); }
bianco
rosso
lancia NullPointerException
Similar Resources on Wayground
10 questions
Rapid Round 1

Quiz
•
University
10 questions
Programming Quiz

Quiz
•
University
10 questions
C++ Quiz

Quiz
•
University
11 questions
SAINS KOMPUTER 1.3

Quiz
•
University
6 questions
Java Method Overloading

Quiz
•
University
5 questions
Java Classes & Objects

Quiz
•
University
10 questions
Python - Functions

Quiz
•
University
10 questions
Flutter Test 1

Quiz
•
University
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
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University