Wrong title correction

Source: Internet
Author: User
Tags java keywords

This topic examines the declaration and use of Java-based variables, and the value of I is changed to 9 and output when the method is called. Select a

Normal methods can access static methods and static variables, but static methods cannot directly access non-static variables and methods. The static variables here are loaded before the method methods, why? Statically belongs to the class, it loads as the virtual machine loads the class, and he is loaded before the constructor method

This topic examines the use of the jump statement break and continue, break can terminate and jump out of the loop body, continue can terminate this cycle, but continue into the next cycle.

Java identifiers can consist of letters, underscores, $, and numbers, but cannot start with numbers, are case-sensitive, and cannot use Java keywords. Answer a is a Java keyword, C begins with a number, and D contains spaces, so answer b is correct.

A class is an abstraction of an object that is a concrete implementation of a class

Return can exit the method of course you can exit the multiple loops break has a special usage: Break: Tag name (with pre-set label before multiple loops) can also exit but this way is similar to VB's goto statement easy to destroy the program flow clarity, so generally basically do not It's enough to show how dull and gloomy the people are. (in addition to this problem can ignore the use of said)

C Java-version, javac–version can view the JDK installation version. In a Windows system, the JDK must be installed before the Java environment can be used. Instead, configure the JDK environment variables. Java_home is not required, using Java_home is similar to a variable in the JAVA language, in the PATH environment variable, you can get the absolute path of the Bin folder by%java_home%\bin, but you can also write the absolute path directly in path such as C \ Jdk1.7.0_75\bin to replace Java_home. So the answer is D.

I is of type int, D is a double type, and the expression i*d*2.0 the result to a double type, so the return value of the method should be double.

The int type value can be converted to a double type value.

The correct order is: Package statement declaration packages, import statement Guide, class statement definition classes

The correct answer is C. The sum () method is used to find the sum of all integers from 5 to the variable num, because the value passed when the sum () method is called is 10, so that is the sum of the integers from 5 to 10 and the result is 45.

The = = Operation compares the values of two variables for equality, and for a reference variable represents whether the two variables are stored in the same address in the heap, that is, whether the contents of the stack are the same. Whether the two variables represented by the equals operation are references to the same object, that is, whether the contents of the heap are the same.

= = This is to determine whether the value of the address is equal to the value of equals is not the same as string new comes out is the new address so the address value is different ABC equals ABC is equal

Because the parameter in the Text.add () method is two int, the argument is given a double type.

The parameter is of type int, and the argument has a double type

Wrong title correction

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.