SlideShare a Scribd company logo
1 of 3
Download to read offline
ArrayOperations.java
import java.util.Arrays;
import java.util.Scanner;
public class ArrayOperations {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double arr[] = input();
System.out.println("Input Array Elements: ");
printArray(arr);
getSquarRoot(arr);
System.out.println("After Square root method called:");
printArray(arr);
replaceValue(arr);
System.out.println("After replace method called:");
printArray(arr);
double arr1[] = copyArray(arr);
System.out.println("Original Array:");
printArray(arr);
System.out.println("New Array:");
printArray(arr1);
}
public static double[] input(){
double arr[] = new double[10];
Scanner scan = new Scanner(System.in);
for(int i=0; i 500)
arr[i] = 500;
}
}
public static double[] copyArray(double arr[]){
double arr1[] = new double[arr.length];
for(int i=0; i
Solution
ArrayOperations.java
import java.util.Arrays;
import java.util.Scanner;
public class ArrayOperations {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double arr[] = input();
System.out.println("Input Array Elements: ");
printArray(arr);
getSquarRoot(arr);
System.out.println("After Square root method called:");
printArray(arr);
replaceValue(arr);
System.out.println("After replace method called:");
printArray(arr);
double arr1[] = copyArray(arr);
System.out.println("Original Array:");
printArray(arr);
System.out.println("New Array:");
printArray(arr1);
}
public static double[] input(){
double arr[] = new double[10];
Scanner scan = new Scanner(System.in);
for(int i=0; i 500)
arr[i] = 500;
}
}
public static double[] copyArray(double arr[]){
double arr1[] = new double[arr.length];
for(int i=0; i

More Related Content

Similar to ArrayOperations.java import java.util.Arrays; import java.util.pdf

package chegg;import java.util.ArrayList; import java.util.List;.pdf
package chegg;import java.util.ArrayList; import java.util.List;.pdfpackage chegg;import java.util.ArrayList; import java.util.List;.pdf
package chegg;import java.util.ArrayList; import java.util.List;.pdfanandf0099
 
JAVA Question : Programming Assignment
JAVA Question : Programming AssignmentJAVA Question : Programming Assignment
JAVA Question : Programming AssignmentCoding Assignment Help
 
Write a program that obtains the execution time of selection sort, bu.pdf
Write a program that obtains the execution time of selection sort, bu.pdfWrite a program that obtains the execution time of selection sort, bu.pdf
Write a program that obtains the execution time of selection sort, bu.pdfarri2009av
 
Hi,I have updated your code. It is working fine now. Highllighted .pdf
Hi,I have updated your code. It is working fine now. Highllighted .pdfHi,I have updated your code. It is working fine now. Highllighted .pdf
Hi,I have updated your code. It is working fine now. Highllighted .pdfaniyathikitchen
 

Similar to ArrayOperations.java import java.util.Arrays; import java.util.pdf (8)

Java Unit 1 Project
Java Unit 1 ProjectJava Unit 1 Project
Java Unit 1 Project
 
package chegg;import java.util.ArrayList; import java.util.List;.pdf
package chegg;import java.util.ArrayList; import java.util.List;.pdfpackage chegg;import java.util.ArrayList; import java.util.List;.pdf
package chegg;import java.util.ArrayList; import java.util.List;.pdf
 
What is new in Java 8
What is new in Java 8What is new in Java 8
What is new in Java 8
 
JAVA Question : Programming Assignment
JAVA Question : Programming AssignmentJAVA Question : Programming Assignment
JAVA Question : Programming Assignment
 
Write a program that obtains the execution time of selection sort, bu.pdf
Write a program that obtains the execution time of selection sort, bu.pdfWrite a program that obtains the execution time of selection sort, bu.pdf
Write a program that obtains the execution time of selection sort, bu.pdf
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Hi,I have updated your code. It is working fine now. Highllighted .pdf
Hi,I have updated your code. It is working fine now. Highllighted .pdfHi,I have updated your code. It is working fine now. Highllighted .pdf
Hi,I have updated your code. It is working fine now. Highllighted .pdf
 
Java programs
Java programsJava programs
Java programs
 

More from ANANDSALESINDIA105

the insoluble compound in the unknown be represen.pdf
                     the insoluble compound in the unknown be represen.pdf                     the insoluble compound in the unknown be represen.pdf
the insoluble compound in the unknown be represen.pdfANANDSALESINDIA105
 
That is true. An element is in its simplest for.pdf
                     That is true. An element is in its simplest for.pdf                     That is true. An element is in its simplest for.pdf
That is true. An element is in its simplest for.pdfANANDSALESINDIA105
 
Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf
                     Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf                     Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf
Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdfANANDSALESINDIA105
 
Lewis dot structure looks like this S=C=N .pdf
                     Lewis dot structure looks like this  S=C=N  .pdf                     Lewis dot structure looks like this  S=C=N  .pdf
Lewis dot structure looks like this S=C=N .pdfANANDSALESINDIA105
 
Fluoride is an ion that comes from a weak acid. K.pdf
                     Fluoride is an ion that comes from a weak acid. K.pdf                     Fluoride is an ion that comes from a weak acid. K.pdf
Fluoride is an ion that comes from a weak acid. K.pdfANANDSALESINDIA105
 
Usually the K+ ions will be more inside the cell during nerve impuls.pdf
Usually the K+ ions will be more inside the cell during nerve impuls.pdfUsually the K+ ions will be more inside the cell during nerve impuls.pdf
Usually the K+ ions will be more inside the cell during nerve impuls.pdfANANDSALESINDIA105
 
trend plus irregularNone of thesetrend plus seasonalSolution.pdf
trend plus irregularNone of thesetrend plus seasonalSolution.pdftrend plus irregularNone of thesetrend plus seasonalSolution.pdf
trend plus irregularNone of thesetrend plus seasonalSolution.pdfANANDSALESINDIA105
 
Solution.Calculation of Statement of stockholder equity For the ye.pdf
Solution.Calculation of Statement of stockholder equity For the ye.pdfSolution.Calculation of Statement of stockholder equity For the ye.pdf
Solution.Calculation of Statement of stockholder equity For the ye.pdfANANDSALESINDIA105
 
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdf
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdfSolution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdf
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdfANANDSALESINDIA105
 
Receptor mediated endocytosisThe receptor for low density lipoprot.pdf
Receptor mediated endocytosisThe receptor for low density lipoprot.pdfReceptor mediated endocytosisThe receptor for low density lipoprot.pdf
Receptor mediated endocytosisThe receptor for low density lipoprot.pdfANANDSALESINDIA105
 
Question 14ans data and instructionsQuestion 15ans data .pdf
Question 14ans  data and instructionsQuestion 15ans  data .pdfQuestion 14ans  data and instructionsQuestion 15ans  data .pdf
Question 14ans data and instructionsQuestion 15ans data .pdfANANDSALESINDIA105
 
option D is correctSolutionoption D is correct.pdf
option D is correctSolutionoption D is correct.pdfoption D is correctSolutionoption D is correct.pdf
option D is correctSolutionoption D is correct.pdfANANDSALESINDIA105
 
pH is defined as negative log of concentration of H+ ion in solution.pdf
pH is defined as negative log of concentration of H+ ion in solution.pdfpH is defined as negative log of concentration of H+ ion in solution.pdf
pH is defined as negative log of concentration of H+ ion in solution.pdfANANDSALESINDIA105
 
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdf
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdfMass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdf
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdfANANDSALESINDIA105
 
i do not agree with above statement. Mathematics is something relate.pdf
i do not agree with above statement. Mathematics is something relate.pdfi do not agree with above statement. Mathematics is something relate.pdf
i do not agree with above statement. Mathematics is something relate.pdfANANDSALESINDIA105
 
Human - ecosystem interaction is sustainable when the social system .pdf
Human - ecosystem interaction is sustainable when the social system .pdfHuman - ecosystem interaction is sustainable when the social system .pdf
Human - ecosystem interaction is sustainable when the social system .pdfANANDSALESINDIA105
 
Here is the code.compile g++ Playlist.cpp main.cppPlaylist.h.pdf
Here is the code.compile  g++ Playlist.cpp main.cppPlaylist.h.pdfHere is the code.compile  g++ Playlist.cpp main.cppPlaylist.h.pdf
Here is the code.compile g++ Playlist.cpp main.cppPlaylist.h.pdfANANDSALESINDIA105
 
Exempt waste & very low level wasteExempt waste and very low level.pdf
Exempt waste & very low level wasteExempt waste and very low level.pdfExempt waste & very low level wasteExempt waste and very low level.pdf
Exempt waste & very low level wasteExempt waste and very low level.pdfANANDSALESINDIA105
 
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdf
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdfDiatoms are unicellular photosynthetic algae. These phytoplankton mi.pdf
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdfANANDSALESINDIA105
 

More from ANANDSALESINDIA105 (20)

where is the data .pdf
                     where is the data                                .pdf                     where is the data                                .pdf
where is the data .pdf
 
the insoluble compound in the unknown be represen.pdf
                     the insoluble compound in the unknown be represen.pdf                     the insoluble compound in the unknown be represen.pdf
the insoluble compound in the unknown be represen.pdf
 
That is true. An element is in its simplest for.pdf
                     That is true. An element is in its simplest for.pdf                     That is true. An element is in its simplest for.pdf
That is true. An element is in its simplest for.pdf
 
Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf
                     Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf                     Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf
Mass of mixture = 1+50.3 = 51.3 g Ratio = 150.3 .pdf
 
Lewis dot structure looks like this S=C=N .pdf
                     Lewis dot structure looks like this  S=C=N  .pdf                     Lewis dot structure looks like this  S=C=N  .pdf
Lewis dot structure looks like this S=C=N .pdf
 
Fluoride is an ion that comes from a weak acid. K.pdf
                     Fluoride is an ion that comes from a weak acid. K.pdf                     Fluoride is an ion that comes from a weak acid. K.pdf
Fluoride is an ion that comes from a weak acid. K.pdf
 
Usually the K+ ions will be more inside the cell during nerve impuls.pdf
Usually the K+ ions will be more inside the cell during nerve impuls.pdfUsually the K+ ions will be more inside the cell during nerve impuls.pdf
Usually the K+ ions will be more inside the cell during nerve impuls.pdf
 
trend plus irregularNone of thesetrend plus seasonalSolution.pdf
trend plus irregularNone of thesetrend plus seasonalSolution.pdftrend plus irregularNone of thesetrend plus seasonalSolution.pdf
trend plus irregularNone of thesetrend plus seasonalSolution.pdf
 
Solution.Calculation of Statement of stockholder equity For the ye.pdf
Solution.Calculation of Statement of stockholder equity For the ye.pdfSolution.Calculation of Statement of stockholder equity For the ye.pdf
Solution.Calculation of Statement of stockholder equity For the ye.pdf
 
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdf
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdfSolution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdf
Solution 9 - (E) $16000Calculation of amount of goodwill at Jnauar.pdf
 
Receptor mediated endocytosisThe receptor for low density lipoprot.pdf
Receptor mediated endocytosisThe receptor for low density lipoprot.pdfReceptor mediated endocytosisThe receptor for low density lipoprot.pdf
Receptor mediated endocytosisThe receptor for low density lipoprot.pdf
 
Question 14ans data and instructionsQuestion 15ans data .pdf
Question 14ans  data and instructionsQuestion 15ans  data .pdfQuestion 14ans  data and instructionsQuestion 15ans  data .pdf
Question 14ans data and instructionsQuestion 15ans data .pdf
 
option D is correctSolutionoption D is correct.pdf
option D is correctSolutionoption D is correct.pdfoption D is correctSolutionoption D is correct.pdf
option D is correctSolutionoption D is correct.pdf
 
pH is defined as negative log of concentration of H+ ion in solution.pdf
pH is defined as negative log of concentration of H+ ion in solution.pdfpH is defined as negative log of concentration of H+ ion in solution.pdf
pH is defined as negative log of concentration of H+ ion in solution.pdf
 
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdf
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdfMass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdf
Mass of hydrogen = (8.1 x 10256.02 x 1023) mol x 1 gmol= 134.6 g.pdf
 
i do not agree with above statement. Mathematics is something relate.pdf
i do not agree with above statement. Mathematics is something relate.pdfi do not agree with above statement. Mathematics is something relate.pdf
i do not agree with above statement. Mathematics is something relate.pdf
 
Human - ecosystem interaction is sustainable when the social system .pdf
Human - ecosystem interaction is sustainable when the social system .pdfHuman - ecosystem interaction is sustainable when the social system .pdf
Human - ecosystem interaction is sustainable when the social system .pdf
 
Here is the code.compile g++ Playlist.cpp main.cppPlaylist.h.pdf
Here is the code.compile  g++ Playlist.cpp main.cppPlaylist.h.pdfHere is the code.compile  g++ Playlist.cpp main.cppPlaylist.h.pdf
Here is the code.compile g++ Playlist.cpp main.cppPlaylist.h.pdf
 
Exempt waste & very low level wasteExempt waste and very low level.pdf
Exempt waste & very low level wasteExempt waste and very low level.pdfExempt waste & very low level wasteExempt waste and very low level.pdf
Exempt waste & very low level wasteExempt waste and very low level.pdf
 
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdf
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdfDiatoms are unicellular photosynthetic algae. These phytoplankton mi.pdf
Diatoms are unicellular photosynthetic algae. These phytoplankton mi.pdf
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

ArrayOperations.java import java.util.Arrays; import java.util.pdf

  • 1. ArrayOperations.java import java.util.Arrays; import java.util.Scanner; public class ArrayOperations { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub double arr[] = input(); System.out.println("Input Array Elements: "); printArray(arr); getSquarRoot(arr); System.out.println("After Square root method called:"); printArray(arr); replaceValue(arr); System.out.println("After replace method called:"); printArray(arr); double arr1[] = copyArray(arr); System.out.println("Original Array:"); printArray(arr); System.out.println("New Array:"); printArray(arr1); } public static double[] input(){ double arr[] = new double[10]; Scanner scan = new Scanner(System.in); for(int i=0; i 500) arr[i] = 500; } } public static double[] copyArray(double arr[]){ double arr1[] = new double[arr.length];
  • 2. for(int i=0; i Solution ArrayOperations.java import java.util.Arrays; import java.util.Scanner; public class ArrayOperations { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub double arr[] = input(); System.out.println("Input Array Elements: "); printArray(arr); getSquarRoot(arr); System.out.println("After Square root method called:"); printArray(arr); replaceValue(arr); System.out.println("After replace method called:"); printArray(arr); double arr1[] = copyArray(arr); System.out.println("Original Array:"); printArray(arr); System.out.println("New Array:"); printArray(arr1); } public static double[] input(){ double arr[] = new double[10]; Scanner scan = new Scanner(System.in); for(int i=0; i 500) arr[i] = 500; } }
  • 3. public static double[] copyArray(double arr[]){ double arr1[] = new double[arr.length]; for(int i=0; i