A java.lang.UnsupportedOperationException exception occurred when calling Add,remove these method after using Arrays.aslist (). This is because Arrays.aslist () returns java.util.arrays$arraylist instead of ArrayList. Arrays$arraylist and ArrayList
The Exec method of runtime is often used to record standard usage and make it easier to copy code later.Process process; String cmd = "cat/sys/devices/virtual/mxc_edid_class/mxc_edid_dev/timing"; StringBuffer SB =New StringBuffer ("");Try{process =
Today I see an interface defined in a Java class, write a memo, record1 Packagecom.gxf.test;2 3 Public classTest_interface {4 Public Interfaceshow{5 Public voidShow ();6 }7 Static classTestInterfaceImplementsshow{8 9
Here is an example of a list combination, First look at the following code: public static arraylistdatas=new arraylist ();//Initialize data public static void InitData () {for ( int i=0;i If you run this way, you will definitely get an exception.
/*Enter a string of lowercase letters (A~Z) through the keyboard. Write a string filter to filter out characters that are not the first occurrence if multiple identical characters appear in the string.For example, the string "ABACACDE" filter result
Item 1: Consider static factory methods instead of constructorsAdvantage:One advantage of static factory methods is, unlike constructors, they has names.A second advantage of static factory methods is, unlike constructors, they was not required to
Garbage collection policy in JavaGarbage collection problems
Who needs to be recycled
When to recycle
How to recycle who needs to be recycledIf an object is no longer used, it can be recycled. The key is how to know that an object is no longer
Spring uses annotations to execute scheduled tasks
1. Add the following configuration in SpringContext. xml
1. Add xmlns to beans: task
xmlns:task="http://www.springframework.org/schema/task"
2. Add in xsi:
Practical application of Singleton ModeFrom the perspective of face object: although they can achieve their goals, they are object-based and object-oriented, just as we can solve problems without face object, the code of the Surface object provides
SLF4J log front and slf4j front
SLF4J Official Website: http://www.slf4j.org/
In general, SLF4J enables our project to replace different log systems at minimal cost. You do not need to modify the code. You only need to add or delete the
Design Mode-decorator ModeDecorator is defined as a Decorator mode. Instead of adding or modifying class attributes in a derived class, the Decorator dynamically designs the Decorator mode to achieve this effect. It is more convenient and flexible
A bug caused by an image of Struts2, struts2bug
Open a project as usual today. Write for a while to save the test. An error occurred while logging on. Ah, yesterday was good. Starting to find bugs
The core error code is as follows:
10:34:46, 442
Internal Sorting Algorithm (I): Exchange sorting (Bubble sorting, fast sorting)
This is the first article in my blog series "Internal sorting algorithms. Sorting is to sort records in files in ascending (or descending) Order of keywords. The
About custom Dialog
Dialog is the legendary pop-up box. Some of the layout and functions provided by the system are relatively simple and generally cannot meet the development requirements. Therefore, we need to implement a custom Dialog by
Steps for using hibernate4 for data persistence
To use hibernate for Data Persistence:
1. Write persistence class: POJO + ing File
2. Get the Configuration object
Configuration is mainly used to manage the Configuration information of hibernate and
Randomize one-dimensional array
A problem: Assume that there is a one-dimensional integer array that is randomization, even if each element appears randomly in the array, and the probability is the same.
Ii. Solution ideas:
1. Construct two arrays,
JavaSE-a simple program inspired new users
A simple program:
Question: now we have completed a simple program that can output the multiplication of two numbers.
Public class TestJava {public static void main (String args []) {int num = 10; //
Target -- action design mode and delegate Design Mode
1. tar get -- action design mode 1. create a View Controller in the View Controller. in the m file, create the CustomView (subclass of UIView) object CustomView * blueView = [[CustomView alloc]
Design Mode-Combination ModeComposite definition: combines objects into a tree structure to represent hierarchical relationships, and allows objects to be presented to client programs in the same way. For example, the compilation of family genealogy:
Many problems that occur when JAVA collections remove their own set ElementsThe purpose of a piece of code is to delete the set items that contain the "a" string in the collection:
public class TestForeach {public static void main(String[]
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.