1 / 6

Clases de uso común

CAPÍTULO 6. Clases de uso común. CLASES Y PAQUETES. C:. Propiedades -> Biblioteca C:/. p3. p1. p2. Test.java. import p3.p1.CCoche;. CCoche coche1 = new CCoche ( );. CCoche . class. CVehiculo.class. CCuenta . class. Cmoto . class. CCAhorro . class. CCCorrie . class.

minowa
Download Presentation

Clases de uso común

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CAPÍTULO 6 Clases de usocomún

  2. CLASES Y PAQUETES C: Propiedades -> Biblioteca C:/ p3 p1 p2 Test.java import p3.p1.CCoche; CCoche coche1 = new CCoche( ); CCoche .class CVehiculo.class CCuenta .class Cmoto .class CCAhorro .class CCCorrie .class p3.p1.CCoche coche2 = new p3.p1.CCoche( ); CRacionales.class Propiedades -> Biblioteca C:/MiBiblioteca.jar MiBiblioteca.jar

  3. CLASES Y PAQUETES PREINSTALADOS java lang io p4 Test.java util C3a .class C2a .class C2b .class C3b .class C1b .class C3b2 .class C3b1 .class C1a .class Object.class C2 .class C1 .class C3 .class import java.io.C2b;

  4. PAQUETES PREINSTALADOS lang util applet net awt otros paquet. predeterminado java io Test.java import java.io.*;

  5. PAQUETE io java io Test.java (lee chars) (lee bytes) (escribe chars) (escribe bytes) Object BufferedReader PrintStream BufferedInputStream PrintWriter FilterImputStream InputStreamReader FilterOutputStream Reader InputStream Writer OutputStream Flujo de entrada Flujo de salida Leer / recibir escribir / enviar objeto1 in objeto2 out D=objeto1.read() objeto2.write(D) n = System.in.read() System.out.println(n)

  6. Enlazarflujos escribir / enviar Leer / recibir (lee char) (lee bytes) (escribe chars) (escribe bytes) BufferedReader PrintStream BufferedInputStream PrintWriter InputStreamReader FilterImputStream FilterOutputStream Reader Writer InputStream OutputStream char char bytes char BufferedInputStream bytes char: read() BufferedReader 2 bytes bytes char bytes char bytes String: readLine() char bytes InputStreamReader br.read() -> char isr br System.in br.readLine() -> String InputStreamReaderisr = new InputStreamReader(System.in) BufferedReaderbr = new BufferedReader (isr)

More Related