[Java] Instancia abstraktnej triedy

Programovacie jazyky, rady, poradňa...
crusher
Novice
Novice
Príspevky: 6
Registrovaný: 04 jún 2010, 15:02

[Java] Instancia abstraktnej triedy

Príspevok od používateľa crusher »

Mal by som otazku ohladom Java API, konkretne teda niekolkych tried.

Ide mi o to, ze v triede java.net.URL pouzitim metody openConnection() je mozne vytvorit instanciu abstraktnej triedy URLConnection. Ako je to mozne? V zdrojakoch som sa k tomu nedopatral.
juho
Star
Star
Používateľov profilový obrázok
Príspevky: 551
Registrovaný: 11 máj 2007, 21:16

Re: [Java] Instancia abstraktnej triedy

Príspevok od používateľa juho »

The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.
Instances of this class
can be used both to read from and to write to the resource referenced by the URL. In general, creating a connection to a URL is a multistep process:
crusher
Novice
Novice
Príspevky: 6
Registrovaný: 04 jún 2010, 15:02

Re: [Java] Instancia abstraktnej triedy

Príspevok od používateľa crusher »

Ok, ale skor som myslel, to ze ktora trieda Java API vytvara implementaciu tej abstraktnej triedy. Medzicasom uz som zistil, ze ho vyvtvaraju triedy mimo Java API.
Napísať odpoveď