what's the meaning of
- abstract data type
- heap and stack in general programming
- java has no preprocessor
5 replies to this topic
#1
Posted 26 September 2010 - 08:01 PM
|
|
|
#2
Posted 26 September 2010 - 10:19 PM
#3
Posted 27 September 2010 - 08:31 AM
I write this question to discuss the answer of it with another people and read a lot of ways to explain it.because I'm new in computer science and it's difficult for me to understant it
but at any way, thanks alot Momerath
but at any way, thanks alot Momerath
#4
Posted 27 September 2010 - 08:34 AM
The linked articles are from an online encyclopedia (i.e. not a manual) so they should be more verbose in depth and provide ample examples from different people.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 27 September 2010 - 11:02 AM
If you want to discuss it, what parts of each do you find interesting/confusing?
#6
Posted 27 September 2010 - 10:18 PM
1) Well an abstract class is something that can never be instanced. It is a class that can only be extended. So lets say I have a class called fighter, fighter would have methods in it that can be used by all fighters, so things like Attack(), Defend(), DoCantTouchThisDance(). But in this imaginary program lets say each fighter has to be more specific than just fighter. So I would have classes like Sameri(), Ninja(), gunner(). These last three classes would extend fighter but you would never want some one to make an instance of fighter because fighter has no body or special abilities so you would mark fighter abstract so that no one can make an instance of fighter. Abstract is basically your way of creating a default class with all the core components but not enough components to use on its own. (sorry if that made no sense, I suck at explaining things and I only learned about abstract data type a few weeks ago.) An abstract method on the other hand is a placeholder and is required to be over ridden. So in short abstract data has no real value until it is extended or overridden.
2) The stack is were methods being called and local variables live. It is were short lived things set. The heap is were Objects and INSTANCE variables set.
I think I got that all right (^_^) I don't know about the other as I am still working on learning Java myself.
2) The stack is were methods being called and local variables live. It is were short lived things set. The heap is were Objects and INSTANCE variables set.
I think I got that all right (^_^) I don't know about the other as I am still working on learning Java myself.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









