Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 1252 times)
0 Members and 1 Guest are viewing this topic.
Offline ReBirth
« Posted 2012-09-20 16: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 Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #1 - Posted 2012-09-21 02: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 Member





« Reply #2 - Posted 2012-09-21 02: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 04: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 Member





« Reply #4 - Posted 2012-09-21 04: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 06: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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (62 views)
2014-04-15 18:08:23

BurntPizza (60 views)
2014-04-15 03:46:01

UprightPath (73 views)
2014-04-14 17:39:50

UprightPath (56 views)
2014-04-14 17:35:47

Porlus (73 views)
2014-04-14 15:48:38

tom_mai78101 (99 views)
2014-04-10 04:04:31

BurntPizza (159 views)
2014-04-08 23:06:04

tom_mai78101 (254 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org 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‑gaming.org
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!