Ask Question

What is the output of this code sequence? (Be exact in your answer with spacing) double [] a = {12.5, 48.3, 65.0}; System. out. println (a[1]);

+1
Answers (1)
  1. 29 August, 10:49
    0
    48.3

    Explanation:

    double [] a = {12.5, 48.3, 65.0}; This line creates the array a, which has three values, those three values can be accesed with the index operator, [].

    System. out. println (a[1]); This line prints in the console the value in the array a in the second position, in Java the index inside arrays starts from zero, then puts a new line.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the output of this code sequence? (Be exact in your answer with spacing) double [] a = {12.5, 48.3, 65.0}; System. out. println ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers