Java Learning Journey-1

Learned Java almost two days, to say and C language difference, still have a lot of, but have to say, the first to learn C language to learn other languages really has a lot of help.First of all, take a look at the basic Java and C language

Three ways to get a class object from Java reflection

String str="Hello World"; //Mode one: Through the GetClass () method of the object Class clazz1 =str.getclass (); //Way two: Through class properties of classes Class clazz2 =string.  class; //Mode three: forname (String

java--Object-oriented

1. Defining classesclass class Name { 0 to multiple constructor definitions ... 0 to multiple member variables ... 0 to multiple methods ...}1.1 Defining constructors[modifier] Constructor Name (parameter list ) {// constructor name

Java strings take advantage of dom4j to XML and traverse

1, because the format of the conversion is not a standard format, so sometimes the XML root directory after rootelement.attributes () do not get the desired propertySo you need an iterator to get the value you want.public static void Teststrtranxml (

Java deadlock Cause and unlock (RPM)

Original addressProcess Deadlock and workaroundFirst, the point of note(1) Grasp the concept of deadlock and the root cause of the birth and Death lock.(2) Understanding the necessary conditions for the creation of deadlocks-the following four

Discussion on the problems related to the transfer of method parameters in Java

We know that there are two purposes for defining variables in Java:1. Prevent the garbage collection mechanism from being recycled, after all, if the ' code ' is not explicitly pointing to real physical memory, it is likely to be garbage collected

Java Implementation print Positive triangle

Positive Triangle Code:1 PackageBasictype;2 /**3 * Encapsulates a method that can print a positive triangle based on the user's incoming value4 * @authorAdministrator5 */6 7 Public classEnme {8 //N represents the number of layers printed9

JAVA---IO stream

Share under Java, use IO to view files, write files, copy files.1. Copy the picture without throwing an exception PackageCom.newdream.class4;ImportJava.io.File;ImportJava.io.FileInputStream;ImportJava.io.FileOutputStream;Importjava.io.IOException;

Porting. Net RSA XML keys to Java

byte[] Expbytes =base64.decodebase64 (Exponentelem.gettext (). Trim ()));byte[] Modbytes =base64.decodebase64 (Moduluselem.gettext (). Trim ());byte[] Dbytes =base64.decodebase64 (Delem.gettext (). Trim ()); BigInteger Modules=NewBigInteger (1,

Springmvc+mybatis+shiro+dubbo+zookeeper Java EE distributed architecture

Built-in features (only part of the functionality is listed)1. User management: The user is the system operator, this function mainly completes the system User Configuration.2. Organization Management: Configuration system Organization (company,

Java Sort Bubble Sort

Code:1 Public classTest {2 Public Static int[] Bublle_sort (inta[]) {3 for(inti = 0; i ) {4 BooleanExchange =false;5 for(intj = 0; J ) {6 if(a[j+1]A[j]) {7 intTMP =A[j];8A[J]

[Leetcode] 50. Pow (x, N) Java

pow

Topic:Implement Pow (x, n).Example 1:input:2.00000, 10output:1024.00000Example 2:input:2.10000, 3output:9.26100test instructions and Analysis: to achieve the X-square, using the division method, the complexity is reduced to log2nCode: Public

Java Network Programming

Socket programmingSockets use TCP to provide a mechanism for communication between two computers. The client program creates a socket and tries to connect to the server's socket.When the connection is established, the server creates a Socket object.

Introduction and usage of BigDecimal class in Java

Java provides operation classes for large numbers (more than 16 significant bits), namely the Java.math.BinInteger class and the Java.math.BigDecimal class, for high-precision computations.  Where the BigInteger class is a processing class for large

Java thread-volatile does not guarantee atomicity

The following is an example of a total atomicity implementation by using volatile:The final result of the variable number is calculated by creating 100 threads. Packagecom. sychronized; Public classVolatiledemo {Private volatileintNumber=0; Public

Java Learning Note 46 (multithreading three: communication between threads)

Multiple threads are working on the same resource, but the tasks of the threads are not the same, so that each thread can use the resources efficiently by some means.This means: Waiting for a wake-up mechanism, also known as communication between

JavaAPI-poi reads Excel files, javaapi-poiexcel

JavaAPI-poi reads Excel files, javaapi-poiexcel 【First blog posting] The project encountered the need to read the Excel file content. I checked a wave of information online and found that poi is easy to use. record it. A small DEMO is implemented,

Struts2 notes -- file upload, struts2 -- File Upload

Struts2 notes -- file upload, struts2 -- File Upload    The HTTP servletrequest standard of Servlet 3.0 provides methods to process file uploads, but such uploads must be completed in Servlet. Struts2 provides simpler encapsulation. Struts2 uses the

IntelliJ IDEA creates the Hello World project of spring boot (illustration), intellijspring

IntelliJ IDEA creates the Hello World project of spring boot (illustration), intellijspring 1. Open IDEA, choose "New --> Project" 2. Choose "Spring Initializr" 3. Choose java 1.7 version, then next 4. Choose "Web" 5. Fill out the project name,

Java concurrency and GC, java concurrent GC

Java concurrency and GC, java concurrent GC 1. synchronized Re-entry scenario: Class of the inheritance relationship, subclass calls the method of the parent class ---------- thread security Methods with synchronized keywords call each other --------

Total Pages: 6206 1 .... 3084 3085 3086 3087 3088 .... 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.