import java.io.file;/* * Purpose: Traverse the root directory to find all files under the. avi and. RMVB,. mp4 at the end of the disk * * 1, traversing the directory * is the file: * Judgment: * is:. avi or. rmvb or. mp4 End file, output file
Enum typepublic class Enumtest {public static void Main (string[] args) {Size S=size.small;Size T=size.large;S and T refer to the same object? System.out.println (s==t); //is the original data type? System.out.println (S.getclass (). isprimitive ());
A constructor is a special method that is called automatically when an object is created in order to initialize it. The name of the constructor should match the name of the class.When objects are created, the system initializes the properties of the
What is the Java memory modelThe Java Virtual Machine specification attempts to define a Java memory model (MODEL,JMM) that masks the access differences of various hardware and operating systems to allow Java programs to achieve consistent memory
1.IP AddressIP Address Composition: Network number segment + host number segmentIP Address Classification:Class A: The first number segment is the network number segment + The third segment of the host number segment1.0.0.1---127.255.255.254 (10.x.x.
The API in POICreate a workbookHssfworkbook wb = new Hssfworkbook ();Create a worksheet, which is a worksheetHssfsheet sheet = wb.createsheet ("car list");Create first row, index starting from 0Hssfrow firstrow = sheet.createrow (0);string[] columns
Java uses the term "Collection" to refer to objects that represent collections, and Java provides many interfaces, first of all we first remember their hierarchies:Basic interface/class hierarchy of the Java Collection Framework java.util.Collection
1. Overview of the Singleton modeThe singleton pattern is to ensure that the class has only one object in memory and that the instance must be created automatically and provided externally.2. Pros and consAdvantage: There is only one object in
Enumtest:Enumeration types are reference types, but small, MEDIUM, and large are not referenced by an object. An enumeration is not part of the original data type, and each of its specific values refers to a specific object, and the same value
1. Overview of the Linkedhashset class: • element Order unique • The chain list ensures that the elements are orderly • guaranteed element unique by hash table2. code example:1 Packagecn.itcast_04;2 3 ImportJava.util.LinkedHashSet;4 5 /*6 *
1, Enumtest.javaSource:public class Enumtest {public static void Main (string[] args) {Size S=size.small;Size T=size.large;S and T refer to the same object? System.out.println (s==t); //is the original data type? System.out.println (S.getclass ().
1. Classes and objectsIn the object-oriented programming process, there are two important concepts: Class and Object (object, also called instance, instance), where the class is an abstraction of a batch of objects, which can be understood as a
The role of threadlocalFrom the previous analysis of threadlocal, it can be concluded thatthreadlocal is not used to solve multi-threaded access problems for shared objects by threadlocal set () The Threadlocal.threadlocalmap method is set to the
1. For classes and inheritance classes, such as:public class HelloB extends HelloA { public HelloB() { } { System.out.println("I’m B class"); } static { System.out.println("static B"); } public static void main(String[] args) { new
Article title: About Java Sample Code event distribution and monitoring mechanism to implementArticle Address: http://blog.csdn.net/5iasp/article/details/37054171javaboy2012Email:[email protected]qq:1046011462First, the scene ifIf there is a blog
Beijing Institute of Electronic TechnologyReal Inspection report Course: Mobile Platform Application development Practice class: 201592 Name: Wang Hechong No.: 20159202Score: Instructor: Lou Jia Peng Experimental Date: 2015.10.3Experiment level:
1. The unique traversal function of the list collection:The size () and get () methods are used in conjunction with the2. code example:1 Packagecn.itcast_03;2 3 Importjava.util.ArrayList;4 Importjava.util.List;5 6 /*7 * unique traversal function of
Stacks and heaps are places that Java uses to store data in RAM. Unlike C + +, Java automatically manages stacks and heaps, and programmers cannot directly set up stacks or heaps.The Java heap is a run-time data area in which the objects of the
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