Mas é bom lembrar que Void (V maiúsculo) é classe,
e o void com V minúsculo não!
Veja em javatutorial no site da sun
[]'s
Dalton Milkvicz de Camargo Engenheiro de Software [EMAIL PROTECTED]Fone: (51)
32.30.44.15 Cel.: (51) 91.28.75.33 GoDigital Marketing de
Precisão www.godigital.com.br
Av. Padre Cacique, 320 - 2º andar - Bloco A 90.810-240 - Porto Alegre -
RS Fax: (51) 3230-4401 R. Antônio das Chagas,
161 04714-000 - São Paulo - SP Fone: (11) 5187-1516 Fax: (11)
5181-9482
----- Original Message -----
Sent: Thursday, January 02, 2003 12:02
PM
Subject: Re: [java-list] void é tipo
primitivo?
java.lang Class Void
java.lang.Object |
+--java.lang.Void
public final class Void extends
Object
The Void class is an uninstantiable placeholder
class to hold a reference to the Class object representing the Java keyword
void.
Since:
JDK1.1
Field Summary static
Class TYPE The
Class object representing the primitive Java type void.
Methods inherited from class java.lang.Object clone, equals, finalize,
getClass, hashCode, notify, notifyAll, toString, wait, wait,
wait
Field Detail TYPE
public static final Class TYPE
The Class object representing the primitive Java type void.
Wagner Levi!
----- Original Message -----
Sent: Wednesday, January 01, 2003
12:20
Subject: [java-list] void é tipo
primitivo?
Pessoal,
surgiu uma duvida bastante intrigante, se em alguma prova tiver a
seguinte questao: void eh um tipo primitivo? a resposta eh verdadeira
ou falsa? a duvida surgiu pois no livro "Thinking in Java" (segunda
edicao), pagina 68, indica que void eh um tipo primitivo. Porem no "The
Java Language Specification - second edition", pagina 286,
tem: "Note that the Java programming language does not allow a "cast to
void"—void is not a type—so the traditional C trick of writing an
_expression statement such as..." e mais ainda na API de Java referente a
classe Void tem o seguinte: "The Void class is an uninstantiable
placeholder class to hold a reference to the Class object representing the
primitive Java type void." fica entao a questao void eh tipo
primitivo? se void eh tipo primitivo, a classe Void eh uma Wrapper
Class?
aguardo respostas,
Wagner
Busca Yahoo! O melhor
lugar para encontrar tudo o que você procura na
Internet
|