Thread: Java Help
View Single Post
Old 04-19-07, 06:51 AM   #1
jcrox
Mahna Mahna
 
jcrox's Avatar
 
Join Date: Jul 2006
Location: Madison, Wi
Posts: 6,134
Default Java Help

This is real simple intro to java stuff but hell If I can figure it out.
I can do this:

SuperClass
int ivar = 8

Sub Class
print ivar to console

TestDrive
instantiate sub class and run display method = 8

Here's where I have a problem if anyone can help:
SuperClass
int ivar

getIvar()

setIvar()
Sub Class
print ivar to console

TestDrive
instantiate sub class and run display method = 0

The program and the instructions are more complex than what's above, but the simple gist of it is that I can't get the sub class to inherit the value of ivar when using getter and setter methods
__________________

Gaming

MSI MPower Z87 | 4770k | CNPS9900MAX-B | 8GB G.Skill 1866 | EVGA GTX760 |ThermalTake 850w | X-Fi Titanium | HAF | Asus PA248Q | Lycosa | Death Adder | Win8 Pro 64

Dev/Backup

MSI GD65 | 2500k | H50 | 8GB G.skill | GTX570 | Ubuntu 13.10

Laptop

17" Inspiron | i5 | 4GB DDR3 | 500GB HDD | Win7 Pro 64

jcrox is offline   Reply With Quote