Java basics-Learn from the context (01) and learn from the context of java

Source: Internet
Author: User

Java basics-Learn from the context (01) and learn from the context of java

1. myeclipse is an eclipse plug-in. Developed in java. The process is javaw.exe -- started in non-command line mode.

 

2. companies that use these terms are often world-class and good companies. (Technical breadth + English)

Java ee ----- Java Platform, Enterprise Edition

Ide ---- Integrated Development Environment

Jms ----- Java Message Service

   
 
 
The Java Message Service (jms) application interface is an API for Message-oriented middleware (MOM) on the Java platform. It is used between two applications, or send messages in a distributed system for asynchronous communication. Java Message Service is an API unrelated to a specific platform. Most MOM providers provide support for JMS.
Http://u2l.info/iFcqZ

Jmx ------ Java Management Extensions, that is, Java Management Extension

   
 
 
JMX (Java Management Extensions) is a framework that embeds Management functions such as applications, devices, and systems. JMX supports flexible development of seamlessly integrated system, network, and service management applications across a series of heterogeneous operating system platforms, system architecture, and network transmission protocols.
Http://u2l.info/1BnwRD

Jndi ------ Java Naming and Directory Interface, Java Naming and Directory Interface

   
 
 
JNDI (Java Naming and Directory Interface, Java Naming and Directory Interface) is a standard Java Naming System Interface provided by SUN. JNDI provides a unified client API, through the implementation of the jndi spi of different access provider interfaces, the Administrator maps the jndi api to a specific naming service and directory system, this allows Java applications to interact with these naming services and directory services. Directory Service is a naming service in which objects not only have names but also attributes.

Java Naming and Directory Interface is an API designed for applications. It provides developers with a universal and unified Interface for searching and accessing various Naming and Directory services, JDBC is built on the abstraction layer.

Http://u2l.info/3VzwA0

 

3. Configure shortcuts for myeclipse

   

3.1 program compilation and running (for the entire workspace ):

Windows ---- preferences --- java

Compiler --- jdk Compiler

Installed JREs --- running environment

   

3.2 programming content assistance (effective for the entire workspace)

   

Windows --- Preferences-General -- Keys

Search for content assist and enter alt +/----> apply in Binding)

If it does not work, it is very likely that alt +/is bound to multiple functions at the same time, in this case, you need to search for alt +/and unbind other bindings (only alt +/<---> content assist is retained ).

3.3 set javac and java for a single project)

   

   

4 Prespective and View

   

The Prespective perspective is a set of different small windows.

For example, debug perspective, java perspective, and java EE perspective ..

In the debug perspective, select a variable in the code area-> right-click-> Watch (observe) to view the corresponding value (in the Expression window ).

 

5. Code Template

Windows --- Preferences-> java-> Editor-> Template-> new

WhereLine_selectionIs the currently selected row, whileCursorThe position of the cursor after the template code is generated.

Later, you can select the code snippet ----> right-click-> Surround With -- tryf (the name just started)

   

You can also use the shortcut key: Shift + Alt + Z after the code snippet is selected.

 

 

6. Static java Import

   

It does not occupy any resources, but can omit the code prefix when writing a java source program.

Import java. io. InputStream;
Import staticJava. lang. Math. max;

Import static java. lang. Math. max;

Public class StaticImport {
Public static void main (String [] args ){
System. out. println (max (1, 2 ));
}
}

 

 

7. variable parameters

   

Problem: the number of parameters received by a method is not fixed, for example:

System. out. println (add (2, 3 ));
System. out. println (add (2, 3, 5 ));

   

Features of variable parameters:

It can only appear at the end of the parameter list.

... It is located between the variable type and the variable name, and can be left with or without spaces.

When a variable parameter method is called, the compiler implicitly creates an array for the variable parameter and accesses the variable parameter in the method body as an array.

 

Private static int add (int x, int... args ){
Int sum = x;

// Access Variable Parameter args in array form
For (int I = 0; I <args. length; I ++ ){
Sum + = args [I];
}
Return sum;
}

 

Where did the author learn from when I saw a master writing a book? Official website.

To ensure the authority of knowledge, the author must find the source. java syntax is defined by sun, so sun will put the syntax on the official website for everyone to read.

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.