SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
sumOfSquares
import java.util.*;
public class Arraylistoperation
{
public static void main(String args[])
{
ArrayList list = createSquaresList(10);
printList(list);
}
public static ArrayList createSquaresList(int n)
{
ArrayList squares= new ArrayList<>();
double s = 0.0;
for (double i = 0.0; i <= n-1; i++)
{
s = i*i;
squares.add(s);
}
return squares;
for(int i = 0; i < m.size(); i++)
{
s+= m.get(i);
}
return s;
}
}
Like wise sumOfCubes
Solution
sumOfSquares
import java.util.*;
public class Arraylistoperation
{
public static void main(String args[])
{
ArrayList list = createSquaresList(10);
printList(list);
}
public static ArrayList createSquaresList(int n)
{
ArrayList squares= new ArrayList<>();
double s = 0.0;
for (double i = 0.0; i <= n-1; i++)
{
s = i*i;
squares.add(s);
}
return squares;
for(int i = 0; i < m.size(); i++)
{
s+= m.get(i);
}
return s;
}
}
Like wise sumOfCubes

Weitere ähnliche Inhalte

Ähnlich wie sumOfSquaresimport java.util.;public class Arraylistoperation.pdf

OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdfakkhan101
 
lec6.ppt
lec6.pptlec6.ppt
lec6.pptcawarir
 
Engineering lecture ppt by venay magen
Engineering lecture ppt by venay magenEngineering lecture ppt by venay magen
Engineering lecture ppt by venay magenvenaymagen19
 
Hi, Please find my code##### Sequence.java ##############import.pdf
Hi, Please find my code##### Sequence.java ##############import.pdfHi, Please find my code##### Sequence.java ##############import.pdf
Hi, Please find my code##### Sequence.java ##############import.pdfanandmobile
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdffreddysarabia1
 
Write a program that uses the ArrayList class and populate it with a.docx
Write a program that uses the ArrayList class and populate it with a.docxWrite a program that uses the ArrayList class and populate it with a.docx
Write a program that uses the ArrayList class and populate it with a.docxalexandernmeredith30
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingSergey Shishkin
 
Les nouveautés de C# 6
Les nouveautés de C# 6Les nouveautés de C# 6
Les nouveautés de C# 6Microsoft
 
import java.util.ArrayList;public class Checkout{private.docx
import java.util.ArrayList;public class Checkout{private.docximport java.util.ArrayList;public class Checkout{private.docx
import java.util.ArrayList;public class Checkout{private.docxAbhinav816839
 
Hi, Please find my codeimport java.util.Random;public class Pro.pdf
Hi, Please find my codeimport java.util.Random;public class Pro.pdfHi, Please find my codeimport java.util.Random;public class Pro.pdf
Hi, Please find my codeimport java.util.Random;public class Pro.pdfanujsharmaanuj14
 
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docx
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docxLab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docx
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docxrennaknapp
 
Java весна 2013 лекция 2
Java весна 2013 лекция 2Java весна 2013 лекция 2
Java весна 2013 лекция 2Technopark
 

Ähnlich wie sumOfSquaresimport java.util.;public class Arraylistoperation.pdf (20)

OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
 
Beyond Scala Lens
Beyond Scala LensBeyond Scala Lens
Beyond Scala Lens
 
Google Guava
Google GuavaGoogle Guava
Google Guava
 
lec6.ppt
lec6.pptlec6.ppt
lec6.ppt
 
Engineering lecture ppt by venay magen
Engineering lecture ppt by venay magenEngineering lecture ppt by venay magen
Engineering lecture ppt by venay magen
 
Hi, Please find my code##### Sequence.java ##############import.pdf
Hi, Please find my code##### Sequence.java ##############import.pdfHi, Please find my code##### Sequence.java ##############import.pdf
Hi, Please find my code##### Sequence.java ##############import.pdf
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
 
Write a program that uses the ArrayList class and populate it with a.docx
Write a program that uses the ArrayList class and populate it with a.docxWrite a program that uses the ArrayList class and populate it with a.docx
Write a program that uses the ArrayList class and populate it with a.docx
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional Programming
 
Les nouveautés de C# 6
Les nouveautés de C# 6Les nouveautés de C# 6
Les nouveautés de C# 6
 
import java.util.ArrayList;public class Checkout{private.docx
import java.util.ArrayList;public class Checkout{private.docximport java.util.ArrayList;public class Checkout{private.docx
import java.util.ArrayList;public class Checkout{private.docx
 
CSharp v1.0.2
CSharp v1.0.2CSharp v1.0.2
CSharp v1.0.2
 
Software Design Thinking
Software Design ThinkingSoftware Design Thinking
Software Design Thinking
 
Hi, Please find my codeimport java.util.Random;public class Pro.pdf
Hi, Please find my codeimport java.util.Random;public class Pro.pdfHi, Please find my codeimport java.util.Random;public class Pro.pdf
Hi, Please find my codeimport java.util.Random;public class Pro.pdf
 
Collection Core Concept
Collection Core ConceptCollection Core Concept
Collection Core Concept
 
ISCP internal.pdf
ISCP internal.pdfISCP internal.pdf
ISCP internal.pdf
 
Huraira_waris_Assgnment_4.docx
Huraira_waris_Assgnment_4.docxHuraira_waris_Assgnment_4.docx
Huraira_waris_Assgnment_4.docx
 
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docx
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docxLab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docx
Lab_3- Objective- Experiment with Lists- Stacks- and Queues- Simulate.docx
 
Oop lecture7
Oop lecture7Oop lecture7
Oop lecture7
 
Java весна 2013 лекция 2
Java весна 2013 лекция 2Java весна 2013 лекция 2
Java весна 2013 лекция 2
 

Mehr von ankit482504

57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf
57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf
57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdfankit482504
 
9The von Neumann equation for time evolution10Solution9T.pdf
9The von Neumann equation for time evolution10Solution9T.pdf9The von Neumann equation for time evolution10Solution9T.pdf
9The von Neumann equation for time evolution10Solution9T.pdfankit482504
 
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdfankit482504
 
Nature of the reports produced. Financial accounting reports tend to.pdf
  Nature of the reports produced. Financial accounting reports tend to.pdf  Nature of the reports produced. Financial accounting reports tend to.pdf
Nature of the reports produced. Financial accounting reports tend to.pdfankit482504
 
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdfankit482504
 
Step1 Fe is oxidised ; its oxidation state change.pdf
                     Step1 Fe is oxidised ; its oxidation state change.pdf                     Step1 Fe is oxidised ; its oxidation state change.pdf
Step1 Fe is oxidised ; its oxidation state change.pdfankit482504
 
The process of performing the procedure known as a Tracheostomy is c.pdf
The process of performing the procedure known as a Tracheostomy is c.pdfThe process of performing the procedure known as a Tracheostomy is c.pdf
The process of performing the procedure known as a Tracheostomy is c.pdfankit482504
 
The Nixon shockwas a series of economic measures undertaken by Unite.pdf
The Nixon shockwas a series of economic measures undertaken by Unite.pdfThe Nixon shockwas a series of economic measures undertaken by Unite.pdf
The Nixon shockwas a series of economic measures undertaken by Unite.pdfankit482504
 
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdf
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdfThe IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdf
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdfankit482504
 
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdf
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdfSecant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdf
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdfankit482504
 
Ro is the reproduction number. It gives the average number of people.pdf
Ro is the reproduction number. It gives the average number of people.pdfRo is the reproduction number. It gives the average number of people.pdf
Ro is the reproduction number. It gives the average number of people.pdfankit482504
 
the salt bridge acts as a porous wall between the.pdf
                     the salt bridge acts as a porous wall between the.pdf                     the salt bridge acts as a porous wall between the.pdf
the salt bridge acts as a porous wall between the.pdfankit482504
 
metl ion can be Cobalt .pdf
                     metl ion can be Cobalt                           .pdf                     metl ion can be Cobalt                           .pdf
metl ion can be Cobalt .pdfankit482504
 
solution or homogeneous mixture Solution .pdf
                     solution or homogeneous mixture Solution     .pdf                     solution or homogeneous mixture Solution     .pdf
solution or homogeneous mixture Solution .pdfankit482504
 
Look at the Periodic Table. Elements are more me.pdf
                     Look at the Periodic Table.  Elements are more me.pdf                     Look at the Periodic Table.  Elements are more me.pdf
Look at the Periodic Table. Elements are more me.pdfankit482504
 
Kcl RbNO3 NaCl .pdf
                     Kcl RbNO3 NaCl                                   .pdf                     Kcl RbNO3 NaCl                                   .pdf
Kcl RbNO3 NaCl .pdfankit482504
 
HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf
                     HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf                     HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf
HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdfankit482504
 
CCl4 because it has for bond pairs and 0 lone pai.pdf
                     CCl4 because it has for bond pairs and 0 lone pai.pdf                     CCl4 because it has for bond pairs and 0 lone pai.pdf
CCl4 because it has for bond pairs and 0 lone pai.pdfankit482504
 
C) each nitrogen has one nonbinding electron pair.pdf
                     C) each nitrogen has one nonbinding electron pair.pdf                     C) each nitrogen has one nonbinding electron pair.pdf
C) each nitrogen has one nonbinding electron pair.pdfankit482504
 
b.Ignore the fact that the orbitals for carbon an.pdf
                     b.Ignore the fact that the orbitals for carbon an.pdf                     b.Ignore the fact that the orbitals for carbon an.pdf
b.Ignore the fact that the orbitals for carbon an.pdfankit482504
 

Mehr von ankit482504 (20)

57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf
57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf
57. Howard Florey 58. Albert Schatz 59. Ernst Boris Chain - .pdf
 
9The von Neumann equation for time evolution10Solution9T.pdf
9The von Neumann equation for time evolution10Solution9T.pdf9The von Neumann equation for time evolution10Solution9T.pdf
9The von Neumann equation for time evolution10Solution9T.pdf
 
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf
27. Microtubules- made of Tubulidentata and present in cytoplasm28.pdf
 
Nature of the reports produced. Financial accounting reports tend to.pdf
  Nature of the reports produced. Financial accounting reports tend to.pdf  Nature of the reports produced. Financial accounting reports tend to.pdf
Nature of the reports produced. Financial accounting reports tend to.pdf
 
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf
1.5 Legal Labels in Verilog areSystem Verilog extends it and al.pdf
 
Step1 Fe is oxidised ; its oxidation state change.pdf
                     Step1 Fe is oxidised ; its oxidation state change.pdf                     Step1 Fe is oxidised ; its oxidation state change.pdf
Step1 Fe is oxidised ; its oxidation state change.pdf
 
The process of performing the procedure known as a Tracheostomy is c.pdf
The process of performing the procedure known as a Tracheostomy is c.pdfThe process of performing the procedure known as a Tracheostomy is c.pdf
The process of performing the procedure known as a Tracheostomy is c.pdf
 
The Nixon shockwas a series of economic measures undertaken by Unite.pdf
The Nixon shockwas a series of economic measures undertaken by Unite.pdfThe Nixon shockwas a series of economic measures undertaken by Unite.pdf
The Nixon shockwas a series of economic measures undertaken by Unite.pdf
 
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdf
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdfThe IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdf
The IUPAC names of the above compounds areZ-4,5-dichloro pent-4-e.pdf
 
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdf
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdfSecant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdf
Secant is 1cosineRangeof cosine is(-1,1)Secant function cannot .pdf
 
Ro is the reproduction number. It gives the average number of people.pdf
Ro is the reproduction number. It gives the average number of people.pdfRo is the reproduction number. It gives the average number of people.pdf
Ro is the reproduction number. It gives the average number of people.pdf
 
the salt bridge acts as a porous wall between the.pdf
                     the salt bridge acts as a porous wall between the.pdf                     the salt bridge acts as a porous wall between the.pdf
the salt bridge acts as a porous wall between the.pdf
 
metl ion can be Cobalt .pdf
                     metl ion can be Cobalt                           .pdf                     metl ion can be Cobalt                           .pdf
metl ion can be Cobalt .pdf
 
solution or homogeneous mixture Solution .pdf
                     solution or homogeneous mixture Solution     .pdf                     solution or homogeneous mixture Solution     .pdf
solution or homogeneous mixture Solution .pdf
 
Look at the Periodic Table. Elements are more me.pdf
                     Look at the Periodic Table.  Elements are more me.pdf                     Look at the Periodic Table.  Elements are more me.pdf
Look at the Periodic Table. Elements are more me.pdf
 
Kcl RbNO3 NaCl .pdf
                     Kcl RbNO3 NaCl                                   .pdf                     Kcl RbNO3 NaCl                                   .pdf
Kcl RbNO3 NaCl .pdf
 
HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf
                     HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf                     HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf
HOAc + NAOH = OAc- + H2O 0.1 0.03 0.07 0 0.03 pH .pdf
 
CCl4 because it has for bond pairs and 0 lone pai.pdf
                     CCl4 because it has for bond pairs and 0 lone pai.pdf                     CCl4 because it has for bond pairs and 0 lone pai.pdf
CCl4 because it has for bond pairs and 0 lone pai.pdf
 
C) each nitrogen has one nonbinding electron pair.pdf
                     C) each nitrogen has one nonbinding electron pair.pdf                     C) each nitrogen has one nonbinding electron pair.pdf
C) each nitrogen has one nonbinding electron pair.pdf
 
b.Ignore the fact that the orbitals for carbon an.pdf
                     b.Ignore the fact that the orbitals for carbon an.pdf                     b.Ignore the fact that the orbitals for carbon an.pdf
b.Ignore the fact that the orbitals for carbon an.pdf
 

Kürzlich hochgeladen

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Kürzlich hochgeladen (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

sumOfSquaresimport java.util.;public class Arraylistoperation.pdf

  • 1. sumOfSquares import java.util.*; public class Arraylistoperation { public static void main(String args[]) { ArrayList list = createSquaresList(10); printList(list); } public static ArrayList createSquaresList(int n) { ArrayList squares= new ArrayList<>(); double s = 0.0; for (double i = 0.0; i <= n-1; i++) { s = i*i; squares.add(s); } return squares; for(int i = 0; i < m.size(); i++) { s+= m.get(i); } return s; } } Like wise sumOfCubes Solution sumOfSquares
  • 2. import java.util.*; public class Arraylistoperation { public static void main(String args[]) { ArrayList list = createSquaresList(10); printList(list); } public static ArrayList createSquaresList(int n) { ArrayList squares= new ArrayList<>(); double s = 0.0; for (double i = 0.0; i <= n-1; i++) { s = i*i; squares.add(s); } return squares; for(int i = 0; i < m.size(); i++) { s+= m.get(i); } return s; } } Like wise sumOfCubes