Results 1 to 2 of 2
Thread: Noob + Java = Questions;
- 09-24-2011, 02:39 PM #1Member
- Join Date
- Sep 2011
- Rep Power
Noob + Java = Questions;
I'm new to Java and OOP. I've got some questions (probably intuitive for you guys).
My first question is, why do I have to import classes? Is there a specific reason why Java doesn't do this automatically, maybe because compiling would take longer?
Numeric data types consist out of int, double, float... why isn't there just one numeric data type, that would except the values of all types? To safe space?
I've purchased a book called "Learning Java, O'Reilly". They state, that a programming language can be split into three categories: Speed, security and probability. What do they mean with this?
When speaking about a dynamic language, what is meant by this?
I've installed Eclipse as the IDE I will be using for Java on my Mac OS X. When creating a new project, why doesn't it automatically create a main class?
I've got so many questions, I would really like to understad Java, so I can create stable programs with it. Thanks. :)
- 09-24-2011, 02:59 PM #2
- Join Date
- Sep 2008
- Voorschoten, the Netherlands
- Blog Entries
- Rep Power
Re: Noob + Java = Questions;
1) Suppose you and I both create a class Foo, each in its own package, say mypackage.Foo and yourpackage.Foo; which class is the compiler to use when it has to compile a class that uses a class Foo?
2) Efficiency, both space and speedwise;
3) I think you mean paotability here, not probability; Java can be quite fast, thanks to its JIT compilation (to raw macine code) and it can be made secure by use of a SecurityManager that forbids a program to execute potentially unsafe operations and Java is portable in a way that you only have to "compiler once and run anywhere".
4) This also is a wide concept and I don't know what you really mean by this.
5) A project (a bunch of classes) can have several classes with a 'main' class or none. What is Eclipse (or any other ide) supposed to create?
Last edited by JosAH; 09-24-2011 at 03:50 PM.Build a wall around Donald Trump; I'll pay for it.
- By Onra in forum New To JavaReplies: 0Last Post: 11-27-2010, 03:47 PM
- By Olgar in forum New To JavaReplies: 8Last Post: 06-30-2010, 02:30 AM
- By critdevil in forum New To JavaReplies: 12Last Post: 03-07-2009, 04:17 AM
- By furry in forum IntroductionsReplies: 0Last Post: 10-07-2008, 07:39 PM
- By Snejana in forum New To JavaReplies: 4Last Post: 01-24-2008, 04:52 AM