1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Novosadov [1.4K]
4 years ago
13

Given 1. class Ex1{ 2. public static void main(String[] args) { 3. int a[] = { 1, 2, 053, 4 }; 4. int b[][] = { { 1, 2, 4 } , {

2, 2, 1 }, { 0, 43, 2 } }; 5. System.out.print( a[3] == b[0][2] ); 6. System.out.print(" " + (a[2]==b[2][1])); 7. } 8. } Which is the result?
Computers and Technology
1 answer:
kirill115 [55]4 years ago
8 0

Answer:

Following will be the output of provided code:

true true

Explanation:

The given Java program is as follows:

1. class Ex1{  

2. public static void main(String[] args) {  

3. int a[] = { 1, 2, 053, 4 };  

4. int b[][] = { { 1, 2, 4 } , { 2, 2, 1 }, { 0, 43, 2 } };  

5. System.out.print( a[3] == b[0][2] );  

6. System.out.print(" " + (a[2]==b[2][1]));  

7. }  

8. }

In the above program line 3 will store array content with values { 1, 2, 053, 4 } from a[0] till a[3].

In line 4 program will store the content { { 1, 2, 4 } , { 2, 2, 1 }, { 0, 43, 2 } } in array elements b[0][0], b[0][1], b[0][2], b[1][0], b[1][1], b[1][2], b[2][0], b[2][1], b[2][2].

In line 5 and 6 respective elements of two array a and b are compared using equal to(==) operator.

In case of line 5, since  a[3] i.e. 4 and b[0][2] i.e. 4 are equal so it will result in true.

Similarly, in line 6, since  a[2] i.e. 43 and b[2][1] i.e. 43 are equal so it will result in true.

Here 053 will be stored as 43 because providing zero before a number will make it in octal base and thus decimal value of 053 will be 5\times8^{1}+3\times 8^{0} = 43.

You might be interested in
How do assignment article computer security, ethics and privacy?
Softa [21]
Explain those things:
Security-What is used to protect.
Ethic-The will to.
Privacy-Is secrecy.
5 0
3 years ago
Discuss what repetitions structures are, and how they differ from the vectorization approaches we have previously studied in the
gogolik [260]

Repetition structures, or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next. Vectorized mathematical code appears more like the mathematical expressions found in textbooks, making the code easier to understand. That is the difference. Hope I could help you on Brainly.com!

6 0
4 years ago
How to cite a website, like asha.org?
inn [45]
Using the APA style or the<span> American Psychological Association style of referencing or citing sources, the structure for website reference is as follows:
</span>Last, F. M. (Year, Month Date Published). Article title<span>. Retrieved from URL. Hence, for the problem:
</span>Last, F. M. (Year, Month Date Published). Article title<span>. Retrieved from http://www.asha.org</span>
8 0
4 years ago
Suppose list1 is an MyArrayList and list2 is a MyLinkedList. Both contains 1 million double values. Analyze the following code:
hjlf

Answer:

The correct answer for the given question is " The Code fragment A runs fastly than the code fragment of B".

Explanation:

In this question there are some information is missing i. e options. The question does not give any options. The options for the given question is given below

(A.) The Code fragment A runs fastly than the code fragment of B.

(B.) The Code fragment B runs fastly than code fragment of  A.

(C)  The Code fragment A runs as fastly as code fragment of B.  

So we conclude the answer i.e option(A) because As given in the question list1  is a MyArrayList and list2 is a MyLinkedList.  , in list1 we fetching the data easily and fastly means that it remove the data easily as compare to list2 As MyArrayList is storing the list only and also we can fetch the data easily manner.

The list2 is an object of MyLinkedList means that it manipulating the data fastly as compared to MyArrayList but if we compared the fetching of data then  MyArrayList is a better option so the code fragment runs fastly then code fragmented B.

7 0
4 years ago
What were the important developments that occurred in photography that facilitated the creation of motion pictures? Two critical
8_murik_8 [283]

Answer:

"A moving picture is an illusion that makes a still photo seem to move. The basic principal behind motion pictures is the fast transition between one picture to the next, almost creating a seamless transition. A flip-book is a good example of this. Another example would be film used for old movies. The film contains negatives of an image which when light is shined through creates a "shadow" of the image. If you quickly transition the film from one image to the next you end up a motion picture."

Explanation:

7 0
3 years ago
Other questions:
  • True or false: when considering data backups, it is most important to verify that the integrity of the backup file or data is va
    9·1 answer
  • Which statement best represents the denotation for the word “woman”? A woman is an adult human female. Both man and woman are re
    11·2 answers
  • Insert the components that the computer uses to perform the tasks of each of the parts:
    13·1 answer
  • Charles would like to move his internet browser window so that he can see his desktop.He should
    5·1 answer
  • How do you activate the Formula AutoComplete function of Excel 2016?
    15·2 answers
  • Are to print or find<br> the sum<br> 5 numbers<br> of<br> using flow chart
    6·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • Each sentence in the paragraph below has a number. Choose the number of two sentences that are in the wrong order in this story.
    14·1 answer
  • What is the difference between electrical and electronic devices?
    5·2 answers
  • IM a bit confused on what this is asking for exactly.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!