2015-07-30Java and 2015-07-30java
2. Right or wrong. In a java multi-state call, the new class is the method of the called class.
Correct answer: A is right or wrong
Parsing: java polymorphism involves two situations: Reload and overwrite. Dynamic single allocation is used, and objects are determined based on the new type to determine the calling method; in overload, static multi-assignment is used, that is, objects are determined based on the static type, so the call method is not determined based on the new type; 4 in a 32-bit operating system, which of the following eight characters is used ______.
Correct answer: D your answer: C (error) short intInt C longUnsigned intLong longCharInt resolution: a character is a byte, a byte is 8 bits (8 bits), not eight bytes
A 16-bit, 2-D, 64-bit, 8-E, 16-bit, 2-F, 32-bit, 4-bit
A character is a letter, number, word, and symbol used in a computer.
The storage of one Chinese character requires two bytes, and the storage of one English character requires one byte.
ASCII is a byte, and Unicode is two bytes.
Java characters are Unicode characters, so they are two bytes.
2 common encoding formats: UTF-8: Unicode TransformationFormat-8bit, which can contain BOM, but typically does not contain BOM. It is a multi-byte encoding for international characters. It uses 8 bits (one byte) for English and 24 bits (three bits) for Chinese characters. UTF-8 contains all the characters needed by all countries in the world, is an international code, universal. UTF-8-encoded text can be displayed on browsers that support UTF8 character sets in countries. For example, if it is UTF-8 encoded, Chinese characters can also be displayed on Internet Explorer of foreigners. They do not need to download the Chinese language support package for Internet Explorer.
GBK is compatible with GB2312 after expansion based on the National Standard GB2312. The GBK text encoding is expressed in double bytes, that is, both Chinese and English characters are expressed in Double Bytes. To distinguish Chinese characters, set the highest bit to 1. GBK contains all Chinese characters. It is a national code and has poor universality than UTF8. However, the database occupied by UTF8 is larger than that occupied by GBD.
7 which of the following statements about JVM memory is false?
Correct answer: C your answer: B (error) The program counter is a relatively small memory area, used to indicate the number of bytes executed by the current thread to the row, it is a thread-isolated Java method execution memory model, which is used to store information such as local variables, operand stacks, dynamic links, and method egress, the method area of thread isolation is used to store JVM-loaded class information, constants, static variables, and even compiled code. In principle, thread isolation is used, all objects are allocated memory in the heap. The Method Area shared between threads is the same as the Java heap. It is the memory Area shared by various threads, it is used to store data such as class information, constants, static variables, and Code Compiled by the real-time compiler loaded by virtual machines. Although the Java Virtual Machine specification describes the method area as a logical part of the Heap, it has an alias called Non-Heap (Non-Heap), which should be distinguished from the Java Heap.
For details, refer to my other blog: http://blog.csdn.net/persist213/article/details/471459598 following the List interface, Set interface and Map interface description, the error is?
Correct answer: A your answer: B (error) They all inherit from the Collection interface List is an ordered Collection, using this interface, you can precisely control the insert position of each element. Set is a CollectionMap that does not contain duplicate elements to provide key-to-value ing. A Map cannot contain the same key. Each key can only be mapped to objects in the same valueList interface in a certain order. Repeated values are allowed.
Objects in the Set interface are not ordered, but repeated objects are not allowed.
The objects in the Map interface are key-value ing relationships. Duplicate keys are not allowed.
Collection ----- List
----- The synchronized list is not synchronized.
---- The ArrayList is non-synchronous and implements an array of elements of a variable size.
---- Vector Synchronization
------ Stack
----- Set does not allow identical elements
Map ----- HashTable synchronization to implement a key-value ing hash table
----- HashMap is not synchronized,
----- WeakHashMap, an improved HashMap, implements "weak references". If a key is not referenced, It is recycled by GC.
10
Which of the following statements about abstract classes and interfaces are true?
Correct answer: a c your answer: D (error) the interface is preferred. abstract classes can be declared as few as possible. Interfaces cannot be declared and abstract classes and interfaces cannot be instantiated. None of the above statements
Resolution: in Java, multiple implementations are implemented with single inheritance. Therefore, abstract methods and interfaces are implemented as much as possible and cannot be instantiated.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.