Ask a Java question
The reason why I'm posting in the PHP section is because I was a PHP programmer before, and now it is.
But recently, looking at Java, see LIST, collection this piece, I completely faint.
Java is too complex, what kinds of lists, all kinds of map, and ArrayList, what is it?
Not all arrays? PHP an array to achieve all AH.
I do not understand why it is so complicated, I have become accustomed to the simplicity of PHP, ask how to learn the Java of these kinds of things?
------to solve the idea----------------------
ArrayList is a complex version of array
------to solve the idea----------------------
It's not as complicated as a container. Just know the features and usage.
------to solve the idea----------------------
PHP is interpreted, and the default data structure is dynamically parsed when the program is run.
Java is compiled, and all data structures require explicit space at compile time.
The array of PHP is composed of 2 parts
1, subscript array (corresponding to the Java array), but not really the array, because the array of the following table is continuous, and PHP subscript array allows subscript discontinuous
2, associative array (corresponding to the Java map), is actually a hash table
PHP also has a arrayobject, corresponding to the Java ArrayList
As for how to learn, it is difficult to say
Personal thought, but there is a little possibility, not to learn
I'm disgusted with Java, but I don't mean you can't use it.
------to solve the idea----------------------
If C is a block of iron, Java is like a knife, PHP is like a gun, hehe, purely personal understanding.
------to solve the idea----------------------
Quote:
If C is a block of iron, Java is like a knife, PHP is like a gun, hehe, purely personal understanding.
------to solve the idea----------------------
References:
Quote: References:
If C is a block of iron, Java is like a knife, PHP is like a gun, hehe, purely personal understanding.
------to solve the idea----------------------
Java, people feel not good, write C good point.
------to solve the idea----------------------
Reference:
PHP is interpreted to execute, the default data structure is dynamically parsed when the program is run
Java is compiled, and all data structures require explicit space at compile time.
The array of PHP is composed of 2 parts
1, subscript array (corresponding to the Java array), but not really the array, because the array of the following table is continuous, and PHP subscript array allows subscript discontinuous
2, associative array (corresponding to the Java map), is actually a hash table
PHP also has a arrayobject, corresponding to the Java ArrayList
As for how to learn, it is difficult to say
Personal thought, but there is a little possibility, not to learn
I'm disgusted with Java, but I don't mean you can't use it.
Java so-called compilation, I really want to say, is also compiled, why the Java program is slow, because Java compiler is not local machine code but compiled into Java bytecode, and then the Java Virtual machine to translate,
------to solve the idea----------------------
Reference:
Java, a person feel not how good, write C good point.
I also do not like Java, you see now out of the new language why should be concise, but also high efficiency,. NET why to out. NET native, Android system using the Java language Why later to out art mode, which explains a lot of problems.
------to solve the idea----------------------
The process of Java execution is more complex than PHP.