-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathatividades6.html
More file actions
108 lines (108 loc) · 5.64 KB
/
atividades6.html
File metadata and controls
108 lines (108 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Atividades_Java6</title>
<link rel="stylesheet" type="text/css" href="stilo.css">
<script language="javascript" src="jsatividades.js"></script>
</head>
<body>
<header>
<div id="logo">
<img src="imagens/logo.png" height="150px">
</div>
<div id="titulo">
<h1>Atividades de Java</h1>
</div>
</header>
<div id="principal">
<div class="efeito">
<div class="container">
<h2>Lista de atividades 6</h2>
<p id="lista6_1">
<b> 1) Ano: 2014 Banca: INSTITUTO AOC PÓrgão: UFGD Prova: Analista de Tecnologia da Informação </b>
<br>
Considere a Linguagem de Programação Java na sua última versão. Sobre declaração de arrays
nesta linguagem, assinale a alternativa INCORRETA.
</p>
<button onclick="mudaCor6_1('red')">A</button> int[] arrayA [] = {{1},{0}}; <br>
<button onclick="mudaCor6_1('lightgreen')">B</button> int[][] arrayB = new int[][];<br>
<button onclick="mudaCor6_1('red')">C</button> int arrayC[][] = {{1},{0}};<br>
<button onclick="mudaCor6_1('red')">D</button> int[][] arrayD = new int[1][1];<br>
<button onclick="mudaCor6_1('red')">E</button> int[][] arrayE = new int[0][1];<br>
</div>
<hr><!--linha horizontal-->
<div class="container">
<p id="lista6_2">
<b>2) Ano: 2015 Banca: FGV Órgão: PGE-RO Prova: Analista da Procuradoria - Analista de Sistemas
(Desenvolvimento)</b>
<br>
Um programador Java precisa utilizar, em seu código, um arranjo dinâmico de números inteiros.
A declaração correta para esse arranjo é:
</p>
<button onclick="mudaCor6_2('red')">A</button> ArrayList(int) arranjo;<br>
<button onclick="mudaCor6_2('red')">B</button> ArrayList(Int) arranjo;<br>
<button onclick="mudaCor6_2('red')">C</button> ArrayList(Integer) arranjo[];<br>
<button onclick="mudaCor6_2('red')">D</button> ArrayList(Int) arranjo[];<br>
<button onclick="mudaCor6_2('lightgreen')">E</button> ArrayList(Integer) arranjo; <br>
</div>
<hr><!--linha horizontal-->
<div class="container">
<p id="lista6_3">
<b>3) Ano: 2017 Banca: FGV Órgão: IBGE Prova: Analista Censitário - Análise de Sistemas -
Desenvolvimento de Aplicações</b>
<br>
Um programador Java precisa utilizar um array unidimensional dinâmico armazenando números
inteiros e decide importar a classe java.util.ArrayList.
<br>
A declaração da referência ao array que ele deverá utilizar é:
</p>
<button onclick="mudaCor6_3('red')">A</button> ArrayList(int) arr; <br>
<button onclick="mudaCor6_3('red')">B</button> ArrayList(int) [ ] arr; <br>
<button onclick="mudaCor6_3('red')">C</button> ArrayList(int) arr [ ];<br>
<button onclick="mudaCor6_3('red')">D</button> ArrayList(Integer) arr [ ]; <br>
<button onclick="mudaCor6_3('lightgreen')">E</button> ArrayList(Integer) arr.<br>
</div>
<hr><!--linha horizontal-->
<div class="container">
<p id="lista6_4">
<b>4) Ano: 2015 Banca: COSEAC Órgão: UFF Prova: Analista de Tecnologia da Informação</b>
<br>
Em relação ao uso de arrays na linguagem Java, avalie as afirmativas a seguir.
<br>
<ol>
<li>Um array é um grupo de variáveis que contém valores todos do mesmo tipo.</li>
<li>O primeiro elemento em cada array tem um índice um.</li>
<li>Um arraylist é semelhante a um array, mas pode ser dinamicamente redimensionado.</li>
</ol>
<br>
Das afirmativas acima, apenas:
</p>
<button onclick="mudaCor6_4('red')">A</button> I está correta.<br>
<button onclick="mudaCor6_4('red')">B</button> II está correta.<br>
<button onclick="mudaCor6_4('red')">C</button> III está correta. <br>
<button onclick="mudaCor6_4('red')">D</button> I e II estão corretas.<br>
<button onclick="mudaCor6_4('lightgreen')">E</button> I e III estão corretas.<br>
</div>
<hr><!--linha horizontal-->
<div class="container">
<p id="lista6_5">
<b>5) Ano: 2013 Banca: CESPE Órgão: SEGESP-AL Prova: Perito Criminal - Tecnologia da Informação</b>
<br>
Julgue o item seguinte, a respeito de linguagens orientadas a objeto.
<br>
De acordo com a linguagem Java, o array é um objeto, portanto, uma variável de instância de
array que for declarada, mas não explicitamente inicializada, terá o valor null.
</p>
<button onclick="mudaCor6_5('lightgreen')">CERTO</button>
<button onclick="mudaCor6_5('red')">ERRADO</button><br>
</div>
</div>
</div>
<table style="width: 100%">
<tr>
<th><a href="atividades5.html">LISTA ANTERIOR</a></th>
<th><a href="index.html">INICÍO</a></th>
</tr>
</table>
</body>
</html>