This article refers to: Java bitwise operatorsThe bitwise operator of Java is used to manipulate a single "bit" (bit) in an integer base data type, which is the generation of a binary bit. And we know that bits are 0 and 1, so the bit operation is
1 Integer typebyte accounted for 1 bytes (1 bytes in memory 8 bitsShort takes 2 bytesint accounted for 4 byteslong takes 8 bytes2 Floating-point typefloat takes 4 bytesdouble takes 8 bytes3 Character Typechar is 2 bytes, character data is 16-bit
Today went over the C language operators of the priority and binding, found that the original learning time did not seriously remember, ashamed. Found a well-spoken article, edited the next turn for later browsing.C language operator precedence
An operator is a special notation used to represent data operations, assignments, comparisons, etc., with the following types of operators in Java 1. Arithmetic OperatorsJavasupport for all basic arithmeticoperator, here are 7 basic arithmetic
In Java programming, some knowledge is not only through the language specification or standard API documents can be learned, this article is listed.
First, realize
1, now Equals ()
Class Person {
String name;
int birthyear;
Byte[]
The ABS method returns the absolute value of a number.
The ACOs method returns the inverse cosine of a number.
The anchor method adds an HTML anchor point with the NAME property at both ends of the object's specified text.
The Asin method returns
There are three kinds of shift operators in Java
>>: Right shift operator, NUM >> 1, equivalent to num divided by 2
>>>: Unsigned right shift, ignoring symbol bit, vacancy is 0
Let's take a look at how these shift operations are used
A. Shift operatorThe shift operator is also for the binary "bit", which mainly includes the left shift operator (>>), and the signed right shift operator (>>). Where: The left-shift operator is represented by ">>", is the specified number of digits
One, C + + has the features that Java does not
Because Java itself is derived from C + +, here only to mention the features of C + + has been abandoned by Java-
00, Java no longer support pointers. This may be the biggest difference between C + +
7, the left-shift operator (Actually the left one is equal to the number multiplied by 2, and the 2 bit is equal to the number multiplied by 4, and so on. This situation is limited to the case where the mobile bit does not contain 1.
8, the right
Bitwise AND Operator (&)
To participate in the operation of the two data, press bits for the "and" operation.
Operation Rules:0&0=0; 0&1=0; 1&0=0; 1&1=1;
That is: two digits at the same time "1", the result is "1", otherwise 0
For example: 3&5
One. Basic data type Knowledge points
The basic data type in 1.c/c++ is.
: integral type, floating point type, character type, no value type
2. How the basic data types are subdivided.
: Integral type includes: Signed Long Integer (signed long int),
Most languages provide bitwise operators, which are widely used in languages such as c,c++, while there are not many application examples in scripting languages such as Js,as, and the appropriate use of bitwise operators can be a good result.Below
C-language operators and their precedence summary tables
Round down ARROW one commaExtraordinary increase or decrease in the length of needleThree multiplication and division, four plus minus, five shiftsDon't forget the fish, it's in Shengfan's
Speaking of operators, basically all kinds of programming languages will be involved, the use of similar methods. Here's a simple collation of JavaScript here today.
In general, operators are still relatively much more, can be divided into the
transferred from: http://zhedahht.blog.163.com/blog/static/2541117420073118945734/
Author: Huangoriginating from: http://zhedahht.blog.163.com/
Title: Enter an integer to find out how many 1 are in the binary representation of the integer. For
SQLite is a software library that implements a self-contained, server-free, 0-configured, transactional SQL database engine. SQLite is one of the fastest growing database engines, which is growing in popularity, regardless of its size. SQLite source
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.