File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes PHP and the fly likes Self? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » PHP
Bookmark "Self?" Watch "Self?" New topic
Author

Self?

Josh Huynh
Greenhorn

Joined: Dec 15, 2013
Posts: 3
I'm trying to figure out the answer this question. I tried googling and looking through my PDF text book none of which is able to tell me the value when "self" is used. I understand the basics, ex is a object of method example and 7 is placed in x making val=7.

Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7052
    
  16

Josh Huynh wrote:I'm trying to figure out the answer this question. I tried googling and looking through my PDF text book none of which is able to tell me the value when "self" is used. I understand the basics, ex is a object of method example and 7 is placed in x making val=7.

This sounds like PHP to me - regular Java does not have a "self" keyword. So I'm moving this post to that forum.

If I'm wrong, let me know, and I'll move it to somewhere more appropriate.

Winston

[Edit] Oops, might have jumped the gun.
@Josh: Let me know if this was intended to be a Java question or whether you are, in fact, writing PHP code. If the first, I'll move it back.

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Welcome to JavaRanch. Given that the code doesn't compile, the question is moot My guess is that the author of this code meant to use this, not self (which doesn't exist in Java): http://en.wikipedia.org/wiki/This_%28computer_programming%29#Java


Ping & DNS - updated with new look and Ping home screen widget
Josh Huynh
Greenhorn

Joined: Dec 15, 2013
Posts: 3
Updating this. You guys were right. I basically wrote in the question that there is no self in java and explained the differences between self and this. Teacher gave me full credit for doing the research. Thanks for your help!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Self?
 
Similar Threads
this keyword is giving me fits!
Method Variable
Get Original Object
Sudoku Solving Java Program
Passing same objects in a class constructor and methods