 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
[email protected] How do I cheat?
Reputation: 0
Joined: 19 Aug 2007 Posts: 4
|
Posted: Sat Aug 25, 2007 9:06 pm Post subject: Java Question |
|
|
Public Class Test {
Public void static main {
Person Henry = new Henry();
House myHouse = new House(Henry);
}
}
public class House {
public House(Person aPerson) {
aPerson.Kill(); //kills the person
}
i set up a crappy thing, anyways i am just wondering if you pass a object into a constructor of another object, then kill it in that constructor.. that will kill the person in test huh ? .. because they share the same memory right?
should do... btw whats Functional Programming
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Sun Aug 26, 2007 9:36 am Post subject: |
|
|
First of all, your basic Java syntax is way off:
The public identifier does not have a capital P.
Any method, including constructors, destructors, and the main method, NEEDS to have a set of parenthesis to specify the parameters in its signature.
Also, you're missing a curly brace at the end.
Now, for your question, yes, the kill method of the instance of that Person class will be called because you're simply passing a reference to that instance. The instance of the class have never actually been duplicated.
Functional: http://en.wikipedia.org/wiki/Functional_programming
Procedural: http://en.wikipedia.org/wiki/Procedural_programming
OOP: http://en.wikipedia.org/wiki/Object-oriented_programming
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|