Java array face questions ask? __java

Source: Internet
Author: User
Java array face questions ask. 5 Which of the following array definitions is wrong.
and add a single-line comment to the wrong answer and write the reason for the error.
A,float[]=new Float[3];
B, float f2[]=new float[];
C, float[] f1=new float[3];.
D, boolean[] b={"true", "false", "true"};.
E, double f4[]={1,3,5};
F, int f5[]=new int[3]{2,3,4};
G, float f4[]={1.2,3.0,5.4};  Collect 188****0365 | Browse 415 times I have a better answer. Recommended for 2016-05-27 13:18:32 best Answer
A variable name not defined
B Uninitialized Array length
C if the back of the full horn. " "If you don't count, you're right.
D if the back of the full horn. " "No, the type is wrong, True/false is quoted as String, not Boolean.
E to
F array definition cannot initialize length and value at the same time
G type is not correct, float type to add F, such as 1f,2.3f

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.