
Java - Revisão I
Computers
University
Used 24+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual a sintaxe para criar um array de 5 Strings?
String meuArray = new String[5];
String[] meuArray = new String[5];
String[5] meuArray = new String[];
String[5] meuArray = new String[5];
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual a sintaxe para criar um array de inteiros com 3 valores iniciais?
int[] meuArray = [1, 5, 3];
int[] meuArray = {1, 5, 3};
int meuArray = {1, 5, 3};
int[3] meuArray = {1, 5, 3};
int[3] meuArray = [1, 5, 3];
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Como importar o ArrayList para dentro do escopo do programa?
import java.util.ArrayList;
import java.Array.List;
import java.ArrayList;
import ArrayList;
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Como criar um ArrayList de booleanos:
ArrayList<Boolean> meuArrayList = new ArrayList<Boolean>();
ArrayList<boolean> meuArrayList = ArrayList<boolean>();
ArrayList<Boolean> meuArrayList = new ArrayList<Boolean>;
ArrayList<boolean> meuArrayList = new ArrayList<boolean>;
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Dado o Array meuArray, como adicionar um valor x dentro do index i?
meuArray.set(i, x);
meuArray.get(i, x);
meuArray[i] = x;
meuArray.get(i) = x;
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Dado o ArrayList meuArrayList, como adicionar um valor x dentro do index i?
meuArrayList.set(i, x);
meuArrayList.get(i, x);
meuArrayList[i] = x;
meuArrayList.get(i) = x;
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Dado um array de inteiros meuArray, como iterar sobre os seus elementos?
for(int x : meuArray) {}
for(int x : int[] meuArray) {}
for(x : meuArray) {}
for(x : int[] meuArray) {}
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?