1 How do I get a list of files in a directory?
File MyDir = new File("C:/Windows/."); String[] FileNames = MyDir.list();
2 How do I implement an open file or a storage file dialog box?
Awt:filedialog class + FilenameFilter class
A. Stream
Represents any data source that is capable of producing data, or any receiving source capable of receiving data. In Java io, all the stream (including input and out stream) includes two types:
1 byte-oriented stream
A byte-oriented
Beginners are better suited to use text editing software to learn Java, have some knowledge of Java recommended to use eclipse, for those who require the development of efficiency of course, the first choice for programmers is JBuilder.
For text
The contents of the threading feature of Java5 line are all under Java.util.concurrent, which contains a large number of interfaces and classes, and familiarity with this part of the API is a difficult learning process. At present, there are few
This article provides an example of an error in a project, provides observations and analysis of it, reveals the specific process of an object in the Java language instantiation, and concludes with an important rule for designing Java classes. By
I used to read books I always can not find the meaning, always to be swallowed, may be on the sake of age (hehe:-)), now start
Slowly into the business, hehe! Everyone should know that in Java STATCI methods are not called STATCI methods, and
Does your user encounter difficulties when running javaapplications? You can create a Windows bat file or a Unix sh file to help him invoke application. But if you have a GUI, then you have a much simpler way to solve the problem.
On many modern
A practical example: the property manager
What is a property file
This gives a single example of a read attribute (properties) file, as a practical example of a single example pattern. A property file is an. ini file that is used to store system
Next we introduce the typical asymmetric encryption algorithm--rsa
Rsa
This algorithm appeared in 1978, it is the first algorithm that can be used both for data encryption and digital signature. It is easy to understand and operate, but also very
The ServerSocket class has the following three options:
1.so_timeout: Sets the timeout time for the Accept method.
2.SO_REUSEADDR: Sets whether the same port on the server can be bound multiple times.
3.SO_RECBUF: Sets the size of the receive
Write a data structure that everyone is familiar with: one-way linked list.
But let me tell you a little secret, Java API has provided a one-way list of classes, you can use directly, but the course of learning data structure must have been known,
The first step is to write the action method:
public string Exportactiveexcel ()
{
String name = "List of active degrees. xls";
try {
name = Java.net.URLEncoder.encode (name, "UTF-8");
FileName = new
In the first section, we describe the basics of JSF portlet operations, including engineering creation, three basic XML configuration files, and common problems and answers that are frequently encountered by JSF portlet developers. Now, I'll explain
Only C + + programmers may be surprised by the hidden name because it works quite differently than in C + +. If a Java base class has a method name that is "overloaded" for multiple times, redefining the method name in the derived class does not
The two main types of output streams are divided by how they are written to data: one is written in human habits and the other is written for later by a datainputstream. Randomaccessfile is independent, although its data format is compatible with
When using the public keyword, it means that the member declaration immediately following the public is applicable to everyone, especially the client programmer who works with the library. Suppose we define a package named dessert that contains the
Restricting thread precedence and scheduling
The Java threading model involves the thread priority that can be changed dynamically. In essence, a thread's priority is a number from 1 to 10, and the larger the number, the more urgent the task is.
Import Arrays ClassImport java.util.arrays;//use Arrays You must import this row, importing the packagepublic class Lianxi11 {public static void Main (string[] args) {Defines a string arrayString[] Hobbys = {"Sports", "Game", "movie"};Use the sort ()
1, The Contains () method is dependent on the Equals () method, and there is no equal () method in the defined class, so it uses the Equals () method in the parent class object, whereas the Equals () method of object compares the address value. For
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