[Java Basics] Documentation notes

Reprinted from: http://blog.163.com/hui_san/blog/static/5710286720104191100389/ObjectiveJava's syntax is similar to C + +, so do you know how many Java annotations there are? 1)//Comment Line2)/*/... * * Comment several lines 3)/** ... * * Comment

Java Recursive algorithm-factorial

Import Java.io.bufferedreader;import Java.io.ioexception;import Java.io.inputstream;import java.io.inputstreamreader;//=================================================//File name:factorial_demo//------ -----------------------------------------------

Developing compilers with Java: Thompson constructs, converting regular expressions to finite state automata

Read blog friends can go to my netease cloud classroom, through the way the video View code debugging and execution process:http://study.163.com/course/courseMain.htm?courseId=1002830012In the previous section, we implemented a finite state

Getting Started with Java: Getting user input for the underlying algorithm

This section shows how to get user input. We use the scanner class to get user input. The following example code shows how to get the string, integer, and float data entered by the user. The main use of the following methods:1) public string

Java reflection is a matter of fact.

What is reflectionjava reflection mechanism: The Java Reflection Mechanism is in the running state,For any class, all the properties and methods of the class can be known;For any object, it can call any of its methods and properties;This dynamic

A series of Java Concurrency Programming: Executor framework

It is common for Java to use threads to complete asynchronous tasks, and the creation and destruction of threads requires a certain amount of overhead, and if each task requires creating a thread that consumes a lot of computing resources, then JDK 5

Java Virtual machine JVM Local Variables table combat

The Java Local Variables table is one of the important groups in the stack frame. He mainly preserves the parameters of the function and the local variable information. A variable scope in a local variable table is a function that is currently

Java Foundation: Application of the Calendar class (better than Date Class)

Application of Calendar classThe most important role of the date class is to get the current time, while the class also has set time and some other functions, but because of its own design problems, these methods have been criticized many, not

Printing 99 multiplication tables in the Java language

Print 99 multiplication tables.Program:Package MyClass;public class MyClass {public static void Main (string[] args) {for (int i=1;ifor (int j=1;jif (j>i) {Break}System.out.printf ("%d*%d=%d", i,j,i*j);}System.out.println ();}}}Results:1*1=12*1=2 2*2

In Java, the length calculation of an array is placed outside the loop body to increase the speed of operation

Example code 1:The length calculation is placed outside the loop body and the result is only defeated by 26% of the Leetcode when running.public void Movezeroes (int[] nums) {int counter = 0;for (int i = 0; i Example code 2:The length calculation is

Field inheritance problem in Java--subclasses cannot inherit private members of parent class

Public class Test1 { privateint t1 = 1; Public int getT1 () { return t1; } Public void setT1 (int t1) { this. T1 = t1; }} The above is the Test1 class, there is a private T1, the value is 1, gave the Get/set method.

How to make Java programs reduce memory consumption (reprint)

This article collects some tips on how to reduce the footprint of Java programs online.(1) Do not use the new Boolean ().In many scenarios, a Boolean type is required, such as the Boolean type set and get in JDBC are passed through a Boolean wrapper,

Java Basics-004

---restore content starts---basic interface of the 14.Java collection class framework  The collection class interface specifies a set of objects called elements. Each specific implementation class of the collection class interface can optionally

Brief talk on the principle of the general implementation of chaining method calls in JavaScript and Java

Believe that in JavaScript, C # have seen a lot of chained method calls, then, where the implementation of this kind of chain call principle, we have not carefully thought about it? There are a lot of examples in the JavaScript class library: JQuery,

Java excel file operations, java excel operations

Java excel file operations, java excel operations Two java excel operations methods were learned two days ago. You can use these two methods to create, modify, and export excel files for a website. The first method is to use JExcel, the second

Java basic knowledge study notes (2)

Java basic knowledge study notes (2)Java basic programming structure 1 a simple java example public class FirstExample{ public static void main(String[] args){ System.out.println("we will not use 'hello world' "); }} What do we know

Java basics 1

Java basics 1I. java Development Tools Editplus: Connection Configuration between Editplus and jdk, such as javac (Compilation), java (running), and javap (view bytecode)A) configuration content:I. javac (Compilation): the parameter is-d.

A huge family that is constantly updated-Java IO

A huge family that is constantly updated-Java IO1. Concept of stream In Java APIs, the object that can read a byte sequence is called an input stream, and the object that can write a byte sequence to it is called an output stream. The source and

Java advanced (25) connecting Java to mysql database (underlying implementation)

Java advanced (25) connecting Java to mysql database (underlying implementation)Java advanced (25) connecting Java to mysql database (underlying implementation) Preface For a long time, no system has been used for java projects. Now we need to

Java (static) variables and (static) code block execution sequence, java Variables

Java (static) variables and (static) code block execution sequence, java VariablesThis article discusses the execution sequence of (static) variables and (static) code blocks in Java. First, three classes are created: 1. Foo class for printing

Total Pages: 6206 1 .... 1628 1629 1630 1631 1632 .... 6206 Go to: GO

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.