Which two code fragments correctly create and initialize a static - ProProfs Discuss
Advertisement

Which two code fragments correctly create and initialize a static array of int elements? (Choose two.)

Which two code fragments correctly create and initialize a static array of int elements? (Choose two.)<br/>

Change Image    Delete

Asked by VMANNI, Last updated: Dec 22, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

VMANNI

VMANNI

VMANNI
VMANNI

Answered Mar 08, 2018

Static final int[] a = { 100,200 };
Static final int [] a; static { a=new int[2]; a[0]=100; a[1]=200; }
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.