I've been searching/reading docs from Oracle for about 2 hours, and I'm pretty stumped. I had thought I understood what an abstract class was, and how it was used (at a basic level, at least). I'm still fairly new to all this, so bear with me please.
As I understand it, an abstract class cannot be instantiated, and instead requires a subclass to implement any part of it. The classes I was looking at, trying to dissect and understand, were BufferStrategy and Canvas, as well as how they work together. I'm not using these classes in a project, more or less just want to understand how they work.
So, let's say I have my Canvas and am creating a BufferStrategy for it:
BufferStrategy bs;
Canvas c;
c = new Canvas();
c.createBufferStrategy(2);
bs = c.getBufferStrategy();
The docs say ".getBufferStrategy()" returns the BufferStrategy currently being used in Canvas. It's obviously not returning an instance of BufferStrategy, so what exactly is it returning, and how is it being stored in "bs"? Also, what would I even refer to "bs" as, when "canvas" would be: "an instance of Canvas"?
I noticed the only subclasses of BufferStrategy, "Component.BltBufferStrategy & Component.FlipBufferStrategy", which I as far as I can tell are nested in Component, and thus shared with Canvas. But I fail to see anywhere that it comes into play.
I hope all this made sense. I apologize if this is a simple basic level question I should know by now, but it's the first thing in the last year that has actually stumped me; probably because I didn't understand certain concepts as well as I had thought. Thank you for reading.