Java journey (3) What is Java?

Source: Internet
Author: User

My colleague gave me the first eleven chapters translated by "thinking in Java, 3rd" and shhgs, which is really good. The first chapter is about object-oriented and Java features
Preliminary introduction, it seems that the first chapter of a foreigner's book is this characteristic, and some are simply called Chapter 0th. But after reading this, I always feel very empty and there is no actual East
West, so read the book. The following is a simple record of some content learned today.

Main features of Java:
Java is a simple, cross-platform, object-oriented, distributed, semi-compiled, semi-explanatory, robust, secure, performance-Excellent, multi-thread, dynamic language.. (It seems that there is only one sentence, but every adjective can take a very large part .)

Comparison between Java and C ++:
1. Automatic Memory Management: Java dynamically allocates memory and has a garbage collection mechanism.
2. Global variables are not defined outside the class.
3. The GOTO statement is no longer used in Java.
4. the pointer is canceled in Java.
5. Supports fixed-digit data types.
6. during runtime, the system checks the type compatibility of type conversion.
7. Java does not support header files and uses import to communicate with other classes.
8. Java does not contain structures and concurrencies. All contents are encapsulated in classes.
9. macros are not supported in Java. A constant is declared using the final keyword.
10. Java does not support multi-inheritance. You can use interfaces in Java to implement multi-inheritance.
I learned C ++. Today, I started to learn Java not because Java is better than C ++, but because Java has a wide range of applications and has a deeper experience when looking for a job, so I learned Java because I need to learn it.

JDK Development Environment tools:
1、java compiler (javac.exe): converts a Java source code file (. Java) into a bytecode file (. class ).
2. Java interpreter (java.exe): used to execute the bytecode compiled by javac.
3. Java appletviewer (appletviewer.exe): executes the Java browser of the Java Applet on the HTML file.
4、java file generator (javadoc.exe): uses Java source file code to generate a set of HTML-format related files.
5、java (jdb.exe): It is a debugging tool that provides a command line debugging environment for Java programs to facilitate the debugging of classes interpreted by Java.
6、java (javap.exe): decomassembles a java byte code file and returns the relevant members of the class.

Appletviewer may be used incorrectly and the following error occurs:
-------------------- I'm an underline -------------------
E:/mywork/Java/practice/sub01> appletviewer hello.html
Exception in thread "Main" Java. util. missingresourceexception: Can't Find resource fo
R bundle sun. Applet. Resources. msgappletviewer, key appletpanel. badattribute. Exception

At java. util. resourcebundle. GetObject (resourcebundle. Java: 314)
At java. util. resourcebundle. GetObject (resourcebundle. Java: 311)
At java. util. resourcebundle. getstring (resourcebundle. Java: 274)
At sun. Applet. appletmessagehandler. getmessage (appletmessagehandler. Java: 39)
At sun. Applet. appletpanel. showappletstatus (appletpanel. Java: 701)
At sun. Applet. appletpanel. INIT (appletpanel. Java: 185)
At sun. Applet. appletviewer. <init> (appletviewer. Java: 175)
At sun. Applet. stdappletviewerfactory. createappletviewer (appletviewer. Java: 80)

At sun. Applet. appletviewer. parse (appletviewer. Java: 1062)
At sun. Applet. appletviewer. parse (appletviewer. Java: 996)
At sun. Applet. Main. Run (main. Java: 138)
At sun. Applet. Main. Main (main. Java: 80)
-------------------- I also underline --------------------
I guess this is the first time I used import. It may be a problem to set environment variables. Let's take a look at the previous Java handouts.

The following sentence is quite interesting. JavaScript (which has nothing to do with Java; it's named that way just to grab some of Java's marketing momentum)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.