|
-
March 23rd, 2010, 08:21 PM
#1
Theory questions about Java
I've been reading my text book and I'm studying for an upcoming test and I have some questions. As you might notice my questions are pretty basic but that's because we're only beginning to cover this topic and therefore we won't have anything serious on inheritance on the test but it will be there mildly. Anyways, on to my questions (sorry if they're badly worded):
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1) If a class is not abstract but it has an abstract method, is it true that it still CAN NOT be instantiated? Or do abstract methods only exist inside abstract classes?
2) The purpose of an abstract METHOD is to make sure the subclass overrides the method but what's the purpose of an abstract CLASS? Is the purpose of an abstract CLASS to be able to store the abstract METHODS? (that is IF I am right in saying that abstract methods HAVE TO BE in abstract classes)
3) Imagine I had an array called, and set up as, array[rows][columns]. Doing array.length would give me the length of the rows but is array[].length the way to get the length of the columns?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any input would be greatly appreciated!
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|