Reading Notes 4 in Java and patterns-LSP and dip)

LSP: If O1 is an object of Type T1, T2. so that all objects defined by T1 can beProgramWhen P is replaced by O2 for all object O1, the behavior of program P does not change, so Type T2 is the child type of Type T1. In other words, if a software

Solve the Problem of Java calling bat batch processing without the CMD window pop-up method analysis

General call method: (this will certainly pop up the CMD window) CopyCodeThe Code is as follows: runtime.getruntime(cmd.exe C ("cmd.exe/C start D: \ test. Bat "); To solve this problem, you only need to add the parameter "/B" after "start:Copy

A good Java BUG checking tool

According to a friend, I found a good Java environment error checking tool findBugs.This tool is really great. I used this tool to find some small bugs in my code. After all, people are human, and they make mistakes. The tool is better than people.

Java annotation Learning

Reprinted from: http://william750214.javaeye.com/blog/298104 Role of metadata If you want to classify the role of metadata, there is no clear definition yet. However, we can divide it into three categories based on its role: L compile the document:

Summary of methods for connecting common JDBC databases in JAVA

1. JDBC connection to DB2 Copy codeThe Code is as follows: Class. forName ("Com.ibm.db2.jdbc.net. DB2Driver "); String url = "jdbc: db2: // dburl: port/DBname" Cn = DriverManager. getConnection (url, sUsr, sPwd ); Class. forName

Parse how to obtain the bean configured in Spring in Java

1. What is Spring?Spring is a lightweight container framework for IoC and AOP. 2. How can I obtain Spring-configured beans in a program?Method 1: Save the ApplicationContext object during initializationCode: Copy codeThe Code is as follows:

Two methods for obtaining md5 values using java

Message Digest Algorithm MD5 (the fifth version of the Message Digest Algorithm in Chinese) is a hash function widely used in the computer security field. It is a common hashing Algorithm. Java can be implemented in two ways. The Code is as follows:

Solutions to Chinese garbled Characters During java post and GET Data Transmission

After N years of java Development, I have never written a website myself. Recently, I am busy with a promotional website for entrepreneurs. I have encountered garbled characters in Chinese character sets like everyone else. In order to avoid detours,

Deep understanding of Java strings "=" and "equals"

Although the question about Java strings "=" and "equals" is the most basic problem in Java learning, many students who have just learned Java cannot figure out the principles, I recently discussed this issue with my friends, so I wrote an article

Brief Introduction to static method rewriting in java

First, let's see what the following program will print: Copy codeThe Code is as follows: class Dog { Public static void bark (){ System. out. print ("woof "); } } Class Basenji extends Dog {Public static void bark (){}} Public class Bark {Public

Three Map traversal methods in java

Three map traversal methods!A very important operation of the Set-traversal. I learned three traversal methods, each of which has its own advantages and disadvantages ~~ Copy codeThe Code is as follows :/* * To change this template, choose Tools |

In-depth analysis of java string and formatted output

1. String, StringBuilder, and StringBufferThe String object is immutable, and the operator + is overloaded, so String s = "a" + 2 + "B" + 2.2; this statement creates four String object objects, assign the last object reference to s. However, the

Java container class

The Java container class includes List, ArrayList, Vector, map, HashTable, and HashMap. ArrayList and HashMap are asynchronous, while Vector and HashTable are synchronous. Therefore, Vector and HashTable are thread-safe, while ArrayList and HashMap

Java enumeration usage

In actual programming, there are often such "datasets", their values are stable in the program, and the elements in the "dataset" are limited. For example, seven data elements from Monday to Sunday constitute a "dataset" for a week, and four data

Java Dynamic Proxy 1-use of dynamic Proxy

1. What is dynamic proxy? A: The dynamic proxy can provide access to another object and hide the actual fact of the object. The proxy generally implements the interface of the actual object it represents. The proxy can access the actual object, but

JAVA calls the stored procedure by calling database functions

The following describes how to call a stored procedure through a database function: Create database function stored procedures Create or replace function stu_proc(V_id IN NUMBER)RETURN VARCHAR2 ISV_name VARCHAR2 (20 );BEGINSELECT o. sname INTO

Differences between the run and start methods in Java threads

The differences between the run () and start () methods in the Thread class are as follows:Run () method: the run () method of the Runnable object can be called multiple times in this thread;Start () method: start a thread and call the run () method

Comparison of common Java collections

1. ArrayList Array-based implementation without capacity restrictions. You may need to expand the number of inserted elements. When deleting an element, the array capacity is not reduced. To reduce the array capacity, you can call trimToSize () When

Get Java source code from Apk

1. decompile Apk to get the Java source code Reprinted from: http://hi.baidu.com/%CB%BF%D4%B5%CC%EC%CF%C2/blog/item/2284e2debafc541e495403ec.html   Download Tool: Requires the dex2jar and JD-GUI tools Dex2jar: http://laichao.googlecode.com/files/dex2

Reading Notes 6 in java and patterns-dummit's Law)

Dummit rules (lods): Also known as the least knowledge principle (LKP), that is to say, an object should have as little knowledge as possible about other objects. In a narrow sense, The dimit rule: If the two classes do not need to communicate

Total Pages: 6206 1 .... 5312 5313 5314 5315 5316 .... 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.