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
Inheritance

Quiz
•
University
10 questions
java operators

Quiz
•
University
9 questions
Java Programming Structures

Quiz
•
University
6 questions
Quiz on methods

Quiz
•
University
12 questions
C Practice Test 1

Quiz
•
University
11 questions
Repaso programación estructurada

Quiz
•
University
10 questions
CSNP-04103 Chapter 6 - Functions

Quiz
•
University
10 questions
Java Static

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University