Problema em livros e apostilas

5 respostas
A

Bom dia a todos
Venho a vocês relatar um problema que encontro em alguns livros e apostilas de java pois neste locais nunca encontra o que são determinado comandos que em todos so pedem para digitar no exemplos, comando for, while, if são muito bem explicados porem coisas como por exemplo getSystemTypeDescription, File.listRoots, getFileSystemView, toLowerCase().contains essas coisas você não encontra o que significam em local nenhum, tipo assim no msdos tudo bem que não se compara porem no MSDOS voce digita: help ai vem lista com todos os comando exemplo TASKILL - termina ou imterrompe um processo bla bla bla coisa que voce não encontram com esses comandos em particular. tudo bem que alguma coisa vc deduz getSystemTypeDescription - deve ser coleta a descrição do tipo do system - E AI qual sistema?.

A Pergunta é a seguinte onde posso encontrar a descrição detalhada desses comandos?

5 Respostas

rmendes08

Já tentou digitar “java documentation” no Google ?

http://docs.oracle.com/javase/6/docs/

Cara, me arrisco a dizer que Java é a plataforma mais bem documentada atualmente.

A

O pior é que ja digitei no google e na ajuda do netbeans também. Obrigado

A

Alguem pode me ajudar a encontrar essa documentação

romarcio

Segura a tecla control e depois clico em cima do método, a IDE então abre um código fonte e elens tem uma explicação no topo do método dizendo para que servem.

douglaskd

você diz isso:

public String getSystemTypeDescription(File f)

Type description for a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "Desktop" folder is desribed as "Desktop". Override for platforms with native ShellFolder implementations.

Parameters:
    f - a File object 
Returns:
    the file type description as it would be displayed by a native file chooser or null if no native information is available.

listRoots

public static File[] listRoots()

List the available filesystem roots.

A particular Java platform may support zero or more hierarchically-organized file systems. Each file system has a root directory from which all other files in that file system can be reached. Windows platforms, for example, have a root directory for each active drive; UNIX platforms have a single root directory, namely "/". The set of available filesystem roots is affected by various system-level operations such the insertion or ejection of removable media and the disconnecting or unmounting of physical or virtual disk drives.

This method returns an array of File objects that denote the root directories of the available filesystem roots. It is guaranteed that the canonical pathname of any file physically present on the local machine will begin with one of the roots returned by this method.

The canonical pathname of a file that resides on some other machine and is accessed via a remote-filesystem protocol such as SMB or NFS may or may not begin with one of the roots returned by this method. If the pathname of a remote file is syntactically indistinguishable from the pathname of a local file then it will begin with one of the roots returned by this method. Thus, for example, File objects denoting the root directories of the mapped network drives of a Windows platform will be returned by this method, while File objects containing UNC pathnames will not be returned by this method.

Unlike most methods in this class, this method does not throw security exceptions. If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to a particular root directory, then that directory will not appear in the result.

Returns:
    An array of File objects denoting the available filesystem roots, or null if the set of roots could not be determined. The array will be empty if there are no filesystem roots.

getFileSystemView

public static FileSystemView getFileSystemView()

aqui nao precisa nem explicar, quando eu faço esse método ele vai me retornar um FileSystemView…só isso


ta tudo nos docs…

acredito que você esta com dificuldade no retorno do método…

por exemplo…:

toLowerCase() é um método da classe string…que retorna a mesma string com letras minusculas

contains() também é um método da classe string que retorna verdadeiro ou falso se a string contem ou não aquele texto nos parametros dele…

eu poderia fazer: “TeXtO”.toLowerCase().ToUpperCase().toLowerCase().ToUpperCase() .toLowerCase().ToUpperCase().toLowerCase().contains();

funcionaria tranquilo…

quando eu coloco um método ligado ao outro, quer dizer que eu pego o retorno do método à esquerda e faço o processamento do proximo método com esse retorno.

tem que entender os retornos dos métodos…

Criado 12 de março de 2012
Ultima resposta 12 de mar. de 2012
Respostas 5
Participantes 4