Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Let's joint our perception  (Read 3414 times)
0 Members and 1 Guest are viewing this topic.
Offline ReBirth
« Posted 2012-09-20 14:12:25 »

Some basic questions about java will be asked to me  Grin just want to know your opinion

1. What is class? Me: it's just blueprint for an object so it can be created.
2. What is object/instance? Me: the real constructed class that has same fields and methods, has state and resides on jvm memory.
3. What is jvm? Me: java virtual machine, doh. It's a secured area of memory that allow java app to move freely.
4. What is heap space? Me: an allocated amount of memory for an app to use.

I think my answers quite right, dunno what they think.

Offline Nate

« JGO Bitwise Duke »

Medals: 167
Projects: 4
Exp: 14 years

Esoteric Software

« Reply #1 - Posted 2012-09-21 00:05:38 »

Your answers are very vague and not quite right. If a class is just a blueprint, what is a static method? An instance doesn't need to have state. The JVM is much more than a block of memory. Saying the heap is some memory provides little information.

Offline Best Username Ever

Junior Devvie

« Reply #2 - Posted 2012-09-21 00:38:23 »

1. Something that defines a data type. The operations that can be done on it and possibly but not necessarily the implementation of those operations.
2. A black box that stores the state of a data structure important to the interface defined for its type.
3. An intermediate layer between compiled code/data and platform specific binary code/data.
4. Global memory an application can borrow from to store objects.

5. What is a primitive? A data type capable of storing raw data with value assignment semantics.
6. What is an array? A collection of randomly accessible variables.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #3 - Posted 2012-09-21 02:35:15 »

Hehe Grin thanks for your times on this silly things. Ah static methods, I should rebuild my definition now.

@Best Username Ever
4. It sounds that heap space size is specified for ALL java apps in a jvm. Are you sure it's not for AN app? because we specify it on run parameter.

Offline Best Username Ever

Junior Devvie

« Reply #4 - Posted 2012-09-21 02:51:45 »

Yes, that's the case. I spoke generally on that topic because I wanted to not be specific to any one VM. Multiple applications can run in the same VM with shared heap space or Java source code could have been compiled with something like GCJ. How the VM (if any) "rations" memory the memory is platform specific or could be tweaked.
Offline StumpyStrust
« Reply #5 - Posted 2012-09-21 04:44:32 »

They way that I think of classes is like factories and cars. The factor has all sorts of methods that are relevant to it and all cars it makes. Every car is an object made from that factory. The factory can specify all the attributes for the model of car it is making and can make many different models.

This helped me understand OOP really well. 

Pages: [1]
  ignore  |  Print  

EgonOlsen (42 views)
2018-06-10 19:43:48

EgonOlsen (22 views)
2018-06-10 19:43:44

EgonOlsen (43 views)
2018-06-10 19:43:20

DesertCoockie (197 views)
2018-05-13 18:23:11

nelsongames (124 views)
2018-04-24 18:15:36

nelsongames (123 views)
2018-04-24 18:14:32

ivj94 (863 views)
2018-03-24 14:47:39

ivj94 (125 views)
2018-03-24 14:46:31

ivj94 (768 views)
2018-03-24 14:43:53

Solater (140 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!