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
saveliy_v [14]
2 years ago
9

Analyze the following output public class Test{ public static void main(String args[]){ int[] x={1,2,3,4}; //here declare array

x with 1 2 3 4 int[] y=x; //here copy the x array into y array x=new int[2]; //here reintilized the array size which is 2 for(int i=0;i<.length;i++){ //here now array length is 2 it iterates 2 times System.out.print(x[i]+" ");
Computers and Technology
1 answer:
Bumek [7]2 years ago
8 0

Answer:

The C language code is a class called Test that accepts an array, duplicates it, reinitializes the first array to the first two items of the previous array, and loops through the array to print both items.

Explanation:

public class Test{

   public static void main(String args[]){

       int[] x={1,2,3,4};         //here declare array x with 1 2 3 4

       int[] y=x;                   //here copy the x array into y array

       x=new int[2];           //here reintilized the array size which is 2

       for(int i=0;i<.length;i++){    //here now array length is 2 it iterates 2 times

           System.out.print(x[i]+" ");

       }

}

You might be interested in
Exampels of semantic tags ?​
spayn [35]
A semantic element clearly describes its meaning to both the browser and the developer.Examples of non-semantic elements: and <span> - Tells nothing about its content. Examples of semantic elements: ,, and - Clearly defines its content.</span>
4 0
2 years ago
The point at coordinates (2, -18) is in what direction from the origin?
laila [671]
On a graph, move 2 spaces to the right and from there move 18 spaces down. Now, where you've ended, make a dot. The distance fro the origin is -2/18 (as a fraction).
4 0
3 years ago
Write a program that uses the function isPalindrome given in Example 6-6 (Palindrome). Test your program on the following string
WITCHER [35]

Answer:

Explanation:

bool isPalindrome(string str)

{

   int length = str.length();

   for (int i = 0; i < length / 2; i++) {

      if (str [i] != str [length – 1 – i]) {

         return false;

         }

    }

cout << str << "is a palindrome";

return true;

}

3 0
3 years ago
Walter’s health insurance premium increased by 22 percent this year. Now he pays $488 every month for health insurance. What was
ElenaW [278]

Answer:

$380.64

Explanation:

So he what you do is take $488 multiply it by 22% to get $107.36 you then subtract $488 from $107.36 to get what he was paying before premium increase which is $380.64

7 0
3 years ago
Do you believe that oop should be phased out and we should start working on some alternative?
Ksju [112]
I don’t think we should because we all have our one choices that we should achieved and we should show
5 0
3 years ago
Other questions:
  • Write a function removeEvens to remove all the even numbers from input row array inRowArray which contains integer numbers. The
    15·1 answer
  • A lever has an effort arm that is 8 meters long and the residence (load) arm that is 1.5 meters long, how much effort is needed
    7·1 answer
  • This LEGENDARY character made a much-celebrated comeback in 2017. What was the name of the villain he faced in this epic tale?
    7·2 answers
  • A tablet computer transmits a file over a wi-fi link to an access point.
    13·1 answer
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    12·1 answer
  • The replacer parameter of the stringify method accepts a/an ______________ or an array.
    15·1 answer
  • A noisy signal has been uploaded to D2L in the files fft_signal.mat and fft_signal.txt.Write a program to estimate the power spe
    10·1 answer
  • Employers can use spyware to track program usage by employees.
    12·1 answer
  • What is closeable interface in java.
    12·1 answer
  • Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!