Recently learn in the selector, so combined with selector source code, write a little notes.
I. What is selector?When it comes to selector, I cannot but mention Selectablechannel,selectionkey. Their relationship is:1. Selector (Selector)The
Summary:functional programming This tepid language is a long-standing one. It is said that this year it will be very hot, although it is difficult, this is the reason you need to learn. So why is functional programming dangerous in Java? Perhaps the
DescribeThis method returns the character at the specified index of the string . The index of the string starts from zero.GrammarThe syntax for this method definition is as follows:PublicChar charAt(int index) ParametersHere are the details of
Feeling more and more strongly,My heart is jumping ~ ~ ~, my sword in the beep ~ ~Flyer.java Package Cc.openhome; Public Interface flyer{ publicabstractvoid fly ();}Swimmer.java Package Cc.openhome; Public Interface swimmer{
I. First turn on SMTP serviceOpen the SMTP service in the QQ mailbox settings, accountNote: After opening, QQ mailbox will generate an authorization code, in the code to connect the mailbox use this authorization code instead of the original mailbox
Haven't noticed before, in fact Java compiled into a. Class in two waysUsing Javac, the default use of the release method, and we often use the MyEclipse tool, with the debug mode.The difference is temporarily understood as follows:Change in release
When learning object-oriented design object relationships, the differences between dependencies, associations, aggregations, and combinations of these four relationships are more confusing. In particular, the last three kinds, only in the semantic
Reference thinging in JavaWhen you are programming, you can save a lot of time by reflecting a gadget if you don't remember whether a class has a method, or if you don't know what a class can do, and you don't want to find the JDK document through
randomaccessfile★ random access to the file, its own method of reading and writing.After new Randomaccessfile (), if the file does not exist, it is created automatically, and exists. -This class actually encapsulates both the byte input stream and
CycleBasic syntax - Looping1.Switch ( int and char )integer type (byte\char \ int \ short) JDK 1.7 above can use stringproblem why Byte and short can be behind a switch but long can't? because byte and short are smaller than int, they can be
1. Definition of a singleton patternThe singleton pattern (Singleton pattern) is a relatively simple pattern, and its original definition is as follows: Ensure a class have only one instance, and provide a global point of access to it . That is,
1. Stack1.1 ClassificationSequential stacks: implementation of sequential linear tablesChained stacks: one-way linked list storage stack1.2 Stacks of applications1) The conversion of the numeralImportJava.util.Scanner;ImportJava.util.Stack; Public
Today, on-line Tomcat starts with a more troublesome problem, with the following errors:21-apr-2016 15:14:19.077 SEVERE [main] org.apache.catalina.core.StandardServer.await standardserver.await:create[ LOCALHOST:8015]: Java.net.BindException:Cannot
1 Packagetest;2 3 /**4 * 5 * Information class for @Title books6 * @authorLR7 * @version1.08 * @since2016-04-219 */Ten One Public classBook { A - PrivateString book_id; - the PrivateString Book_name; - - PrivateString
Java online service troubleshooting1. Business logs
If the system is abnormal or the business is abnormal, the first thing that comes to mind is to view the business logs.
View the log tool:
Less or more
Grep
Tail-f filename: view the latest content
344. Reverse String, 344 reversestring
Write a function that takes a string as input and returns the string reversed.
Example:Given s = "hello", return "olleh ".
The Code is as follows:
Method 1: (java)
1 public class Solution {2 public String
Fun shortcut keys and fun shortcut keys
Today, I made a very interesting project called the shortcut key. The main research of this project is: the idea of object-oriented design, the encapsulation of classes, and the use of constructor methods, use
Implement the Filter interface through Servlet interface implementation like GenericServlet to implement servlet Interface
When writing a Filter, we need to implement the Filter interface and implement methods such as init (FilterConfig arg0),
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