Intro to Java Web-Notes_Part74

Intro to Java Web-Notes_Part74 - A aref = new A(); B bref :...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A aref = new A(); B bref : new B(); C cref : new C(); System.out.println("Values: " W aref.ia); System.out.println("Values: " W bref.ib); System.out.print’n("Va’ues: " W cref.ic); System.out.print’n("Va’ues: " W cref.ib); System.out.print’n("Va’ues: " W cref.ia); A a2; a2 = (A) bref; System.out.println("Numz " W a2.ia); System.out.println("Num: " W a2.ib); B b2 = new C(); System.out.print’n("Va’z " W b2.ia); System.out.print’n("Va’z " W b2.ib); System.out.print’n("Va’z " W b2.ic); C C2 = (C) b2; } } Class A { int is = l; } class B extends A { int ib = 2; } class C extends B { int ic : 3; } Hams - About Us Copyright © 2006 by Kiowok, Ann Arbor, Michigan, USA ...
View Full Document

Page1 / 2

Intro to Java Web-Notes_Part74 - A aref = new A(); B bref :...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online