X-Received: by 10.68.196.134 with SMTP id im6mr2055720pbc.5.1361313063048; Tue, 19 Feb 2013 14:31:03 -0800 (PST) X-Received: by 10.50.217.225 with SMTP id pb1mr2511094igc.5.1361313063002; Tue, 19 Feb 2013 14:31:03 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!su1no905511pbb.0!news-out.google.com!jm3ni9718pbb.0!nntp.google.com!su1no905502pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Tue, 19 Feb 2013 14:31:02 -0800 (PST) In-Reply-To: <30772112-527f-47b0-9333-70777b889b5c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 69.28.149.29 References: <30772112-527f-47b0-9333-70777b889b5c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: HttpURLConnection From: Lew Injection-Date: Tue, 19 Feb 2013 22:31:03 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:22377 On Tuesday, February 19, 2013 1:45:25 PM UTC-8, bob smith wrote: > How can people use the class HttpURLConnection when the abstract method connect() > from URLConnection is never defined? False. > I thought you can't use a class till all the abstract blanks are filled in? True. Look up polymorphism and widening conversions. http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.5 Understand the difference between declared type (compile time) and run-time type. Read the Java tutorials. Did you know that any object of a given type is also an object of every supertype of its type? That's how you can get List foos = new ArrayList<>(); 'List', being an interface, has only abstract instance methods. Yet somehow you can call foos.add(new Foo()); Same thing. This is basic Java stuff. Heck, it's basic O-O stuff. Google around for some introductory texts. -- Lew