Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (408)
games submitted by our members
Games in WIP (293)
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 929 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 Wizard


Medals: 81
Projects: 3


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!
Play the free demo of Revenge of the Titans!
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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (102 views)
2013-05-17 21:29:12

alaslipknot (112 views)
2013-05-16 21:24:48

gouessej (140 views)
2013-05-16 00:53:38

gouessej (136 views)
2013-05-16 00:17:58

theagentd (147 views)
2013-05-15 15:01:13

theagentd (133 views)
2013-05-15 15:00:54

StreetDoggy (176 views)
2013-05-14 15:56:26

kutucuk (198 views)
2013-05-12 17:10:36

kutucuk (200 views)
2013-05-12 15:36:09

UnluckyDevil (206 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.201 seconds with 21 queries.