Results 1 to 5 of 5
Thread: Dot Syntax
- 11-09-2013, 07:28 PM #1
Member
- Join Date
- Oct 2013
- Posts
- 11
- Rep Power
- 0
- 11-09-2013, 07:39 PM #2
Re: Dot Syntax
how do you get the data from char?
If aChar is a reference to an instance of a class, you need to read the API doc for that class to see what methods it has that can be called to get the data it contains. For example:
someData = aChar.getSomeData();If you don't understand my response, don't ignore it, ask a question.
- 11-09-2013, 07:57 PM #3
Member
- Join Date
- Oct 2013
- Posts
- 11
- Rep Power
- 0
Re: Dot Syntax
Ok,
first: I know it was an illegal name, I was using it to imply the data type I wanted to compare.
second: I am still confused and probably because I used a bad example, so I will use my specific example.
I have a class called Virus and I have a client method that creates several Virus objects. within this same method I want to check if some of the contents of the objects are the same and to do this I am overriding the equals method but within the Virus class. So I want to call the equals method in the form of object1.equals(object2). I know how to get the data from object2 but how do I get the data from object1?
- 11-09-2013, 08:19 PM #4
Member
- Join Date
- Oct 2013
- Posts
- 11
- Rep Power
- 0
Re: Dot Syntax
Ok I figured it out
Thank you for your help Norm!
- 11-09-2013, 08:20 PM #5
Similar Threads
-
Syntax Errors
By andimiami in forum New To JavaReplies: 8Last Post: 09-15-2011, 01:23 PM -
Quotations Syntax Help
By loopsnhoops in forum New To JavaReplies: 2Last Post: 06-12-2011, 07:44 AM -
Syntax correct?
By dbashby in forum New To JavaReplies: 5Last Post: 09-22-2009, 06:44 AM -
A question about syntax.
By mr_o in forum New To JavaReplies: 2Last Post: 09-19-2009, 08:30 PM -
syntax error
By gabriel in forum New To JavaReplies: 3Last Post: 08-03-2007, 03:26 PM
Bookmarks