Author Topic: What I've done  (Read 4933 times)

Tenebrae

  • Sinnoh/Unova Head Builder
  • Professor
  • Fighting Agatha
  • *****
  • Posts: 7604
  • Friendliness: 105
  • Monster Hunter 4 Ultimate :D
    • Bandcamp
Re: What I've done
« Reply #15 on: May 24, 2012, 07:18:03 am »
This was fun  :haha:


Seems like your enjoying it :P

Ad...

Paradox

  • Professor
  • Fighting Giovanni
  • *****
  • Posts: 966
  • Friendliness: 39
  • Registered User
Re: What I've done
« Reply #16 on: May 24, 2012, 04:43:05 pm »
whoa freaky stuff if i initialize:

Code: [Select]
thingy thing1 = new thingy();
thingy thing2 = thing1

 :O_o:

I thought it would copy the fields and methods and be separate after that line...


Not freaky, it's called pointers. When you use non-objects for initializing, like
int i=5;
int j=i;


They're different but just have the same value. But with objects, you point to the same reference. You need to make them initialize different or else they point to the same piece of memory, i.e if you change anything in thing1 it'll change what's in thing2.

CalDaBeast

  • Entering Mt Moon
  • ****
  • Posts: 115
  • Friendliness: 0
  • Plugin Developer and VoxelHoenn Head Builder
    • VoxelWiki Profile
Re: What I've done
« Reply #17 on: June 28, 2012, 09:29:21 pm »
Isn't java FUN!??

Just to show-up 1ce, a snippit of code from one of my plugins...
Which one will I choose?
olyForge! https://github.com/CalDaBeast/olyForge/blob/master/src/com/olympuspvp/caldabeast/olyForge.java
Don't you just love Java?
-CalDaBeast
 Plugin Developer
 Head Builder of VoxelHoenn