SlideShare a Scribd company logo
1 of 2
Can someone help me get a better understanding of StackInterface in java?
I also am having trouble with some of these methods i need to write.
public interface StackInterface<T> {
/**
* Add element to top of stack.
* @param newEntry item to add to stack.
*/
public void push(T newEntry);
/**
* Remove and return top element from stack.
* @return top element.
* @throws EmptyStackException if the stack is empty
*/
public T pop();
/**
* Return top element from stack without modifying stack.
* @return Element on top of stack.
* @throws EmptyStackException if the stack is empty
*/
public T peek();
/**
* Whether stack is empty.
* @return True if stack is empty, false otherwise.
*/
public boolean isEmpty();
/**
* Remove all elements from stack.
*/
public void clear();
}

More Related Content

More from RichardjOZTerryp

Bones Structure and Function Lab Identify the following structures in.docx
Bones Structure and Function Lab Identify the following structures in.docxBones Structure and Function Lab Identify the following structures in.docx
Bones Structure and Function Lab Identify the following structures in.docxRichardjOZTerryp
 
Bone and Structure Lab1-) Identify types of bones based upon their sha.docx
Bone and Structure Lab1-) Identify types of bones based upon their sha.docxBone and Structure Lab1-) Identify types of bones based upon their sha.docx
Bone and Structure Lab1-) Identify types of bones based upon their sha.docxRichardjOZTerryp
 
bond issue-What will be the total interest payments over the five-year.docx
bond issue-What will be the total interest payments over the five-year.docxbond issue-What will be the total interest payments over the five-year.docx
bond issue-What will be the total interest payments over the five-year.docxRichardjOZTerryp
 
Below is the Tycho crater on the surface of the Moon- The left image p.docx
Below is the Tycho crater on the surface of the Moon- The left image p.docxBelow is the Tycho crater on the surface of the Moon- The left image p.docx
Below is the Tycho crater on the surface of the Moon- The left image p.docxRichardjOZTerryp
 
Below b a graph showing alinear regression of Ser genotypes and dorsa.docx
Below b a graph showing alinear regression of  Ser genotypes and dorsa.docxBelow b a graph showing alinear regression of  Ser genotypes and dorsa.docx
Below b a graph showing alinear regression of Ser genotypes and dorsa.docxRichardjOZTerryp
 
Below is an impact crater on the surface of the Earth- This is the Met.docx
Below is an impact crater on the surface of the Earth- This is the Met.docxBelow is an impact crater on the surface of the Earth- This is the Met.docx
Below is an impact crater on the surface of the Earth- This is the Met.docxRichardjOZTerryp
 
Being a taker can be potentially beneficial because- Select one- A- th.docx
Being a taker can be potentially beneficial because- Select one- A- th.docxBeing a taker can be potentially beneficial because- Select one- A- th.docx
Being a taker can be potentially beneficial because- Select one- A- th.docxRichardjOZTerryp
 
below is some of the work i began on LispEvaluate on java- but i'm hav.docx
below is some of the work i began on LispEvaluate on java- but i'm hav.docxbelow is some of the work i began on LispEvaluate on java- but i'm hav.docx
below is some of the work i began on LispEvaluate on java- but i'm hav.docxRichardjOZTerryp
 
Below is an idealized diagram of several oceanic plates and a continen.docx
Below is an idealized diagram of several oceanic plates and a continen.docxBelow is an idealized diagram of several oceanic plates and a continen.docx
Below is an idealized diagram of several oceanic plates and a continen.docxRichardjOZTerryp
 
Begin on the left side of the map and trace over 30oN latitude with yo.docx
Begin on the left side of the map and trace over 30oN latitude with yo.docxBegin on the left side of the map and trace over 30oN latitude with yo.docx
Begin on the left side of the map and trace over 30oN latitude with yo.docxRichardjOZTerryp
 
Before June production is recorded- the Work in Process inventory acco.docx
Before June production is recorded- the Work in Process inventory acco.docxBefore June production is recorded- the Work in Process inventory acco.docx
Before June production is recorded- the Work in Process inventory acco.docxRichardjOZTerryp
 
Because human wants are insatiable and unlimited while available resou.docx
Because human wants are insatiable and unlimited while available resou.docxBecause human wants are insatiable and unlimited while available resou.docx
Because human wants are insatiable and unlimited while available resou.docxRichardjOZTerryp
 
Cash budgets are based on cash accounting rather than accrual accounti.docx
Cash budgets are based on cash accounting rather than accrual accounti.docxCash budgets are based on cash accounting rather than accrual accounti.docx
Cash budgets are based on cash accounting rather than accrual accounti.docxRichardjOZTerryp
 
Cash had a beginning balance of $69-600- During the month- Cisti was c.docx
Cash had a beginning balance of $69-600- During the month- Cisti was c.docxCash had a beginning balance of $69-600- During the month- Cisti was c.docx
Cash had a beginning balance of $69-600- During the month- Cisti was c.docxRichardjOZTerryp
 
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docx
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docxCase study on Facebook IPO 1- What is the IRo date when the undenwrite.docx
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docxRichardjOZTerryp
 
Cartos plays college soccer- He makes a goal 65 percent of the time he.docx
Cartos plays college soccer- He makes a goal 65 percent of the time he.docxCartos plays college soccer- He makes a goal 65 percent of the time he.docx
Cartos plays college soccer- He makes a goal 65 percent of the time he.docxRichardjOZTerryp
 
Carcinogens refer to chemicals which primarily cause reproductive diso.docx
Carcinogens refer to chemicals which primarily cause reproductive diso.docxCarcinogens refer to chemicals which primarily cause reproductive diso.docx
Carcinogens refer to chemicals which primarily cause reproductive diso.docxRichardjOZTerryp
 
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docx
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docxCapital Power and Light has Cash of $200- Accounts Receivable of $900-.docx
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docxRichardjOZTerryp
 
Can you think of a time that a company inverted the means and ends- or.docx
Can you think of a time that a company inverted the means and ends- or.docxCan you think of a time that a company inverted the means and ends- or.docx
Can you think of a time that a company inverted the means and ends- or.docxRichardjOZTerryp
 
Can it be solved with an equations shown- The stockhalders' equity acc.docx
Can it be solved with an equations shown- The stockhalders' equity acc.docxCan it be solved with an equations shown- The stockhalders' equity acc.docx
Can it be solved with an equations shown- The stockhalders' equity acc.docxRichardjOZTerryp
 

More from RichardjOZTerryp (20)

Bones Structure and Function Lab Identify the following structures in.docx
Bones Structure and Function Lab Identify the following structures in.docxBones Structure and Function Lab Identify the following structures in.docx
Bones Structure and Function Lab Identify the following structures in.docx
 
Bone and Structure Lab1-) Identify types of bones based upon their sha.docx
Bone and Structure Lab1-) Identify types of bones based upon their sha.docxBone and Structure Lab1-) Identify types of bones based upon their sha.docx
Bone and Structure Lab1-) Identify types of bones based upon their sha.docx
 
bond issue-What will be the total interest payments over the five-year.docx
bond issue-What will be the total interest payments over the five-year.docxbond issue-What will be the total interest payments over the five-year.docx
bond issue-What will be the total interest payments over the five-year.docx
 
Below is the Tycho crater on the surface of the Moon- The left image p.docx
Below is the Tycho crater on the surface of the Moon- The left image p.docxBelow is the Tycho crater on the surface of the Moon- The left image p.docx
Below is the Tycho crater on the surface of the Moon- The left image p.docx
 
Below b a graph showing alinear regression of Ser genotypes and dorsa.docx
Below b a graph showing alinear regression of  Ser genotypes and dorsa.docxBelow b a graph showing alinear regression of  Ser genotypes and dorsa.docx
Below b a graph showing alinear regression of Ser genotypes and dorsa.docx
 
Below is an impact crater on the surface of the Earth- This is the Met.docx
Below is an impact crater on the surface of the Earth- This is the Met.docxBelow is an impact crater on the surface of the Earth- This is the Met.docx
Below is an impact crater on the surface of the Earth- This is the Met.docx
 
Being a taker can be potentially beneficial because- Select one- A- th.docx
Being a taker can be potentially beneficial because- Select one- A- th.docxBeing a taker can be potentially beneficial because- Select one- A- th.docx
Being a taker can be potentially beneficial because- Select one- A- th.docx
 
below is some of the work i began on LispEvaluate on java- but i'm hav.docx
below is some of the work i began on LispEvaluate on java- but i'm hav.docxbelow is some of the work i began on LispEvaluate on java- but i'm hav.docx
below is some of the work i began on LispEvaluate on java- but i'm hav.docx
 
Below is an idealized diagram of several oceanic plates and a continen.docx
Below is an idealized diagram of several oceanic plates and a continen.docxBelow is an idealized diagram of several oceanic plates and a continen.docx
Below is an idealized diagram of several oceanic plates and a continen.docx
 
Begin on the left side of the map and trace over 30oN latitude with yo.docx
Begin on the left side of the map and trace over 30oN latitude with yo.docxBegin on the left side of the map and trace over 30oN latitude with yo.docx
Begin on the left side of the map and trace over 30oN latitude with yo.docx
 
Before June production is recorded- the Work in Process inventory acco.docx
Before June production is recorded- the Work in Process inventory acco.docxBefore June production is recorded- the Work in Process inventory acco.docx
Before June production is recorded- the Work in Process inventory acco.docx
 
Because human wants are insatiable and unlimited while available resou.docx
Because human wants are insatiable and unlimited while available resou.docxBecause human wants are insatiable and unlimited while available resou.docx
Because human wants are insatiable and unlimited while available resou.docx
 
Cash budgets are based on cash accounting rather than accrual accounti.docx
Cash budgets are based on cash accounting rather than accrual accounti.docxCash budgets are based on cash accounting rather than accrual accounti.docx
Cash budgets are based on cash accounting rather than accrual accounti.docx
 
Cash had a beginning balance of $69-600- During the month- Cisti was c.docx
Cash had a beginning balance of $69-600- During the month- Cisti was c.docxCash had a beginning balance of $69-600- During the month- Cisti was c.docx
Cash had a beginning balance of $69-600- During the month- Cisti was c.docx
 
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docx
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docxCase study on Facebook IPO 1- What is the IRo date when the undenwrite.docx
Case study on Facebook IPO 1- What is the IRo date when the undenwrite.docx
 
Cartos plays college soccer- He makes a goal 65 percent of the time he.docx
Cartos plays college soccer- He makes a goal 65 percent of the time he.docxCartos plays college soccer- He makes a goal 65 percent of the time he.docx
Cartos plays college soccer- He makes a goal 65 percent of the time he.docx
 
Carcinogens refer to chemicals which primarily cause reproductive diso.docx
Carcinogens refer to chemicals which primarily cause reproductive diso.docxCarcinogens refer to chemicals which primarily cause reproductive diso.docx
Carcinogens refer to chemicals which primarily cause reproductive diso.docx
 
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docx
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docxCapital Power and Light has Cash of $200- Accounts Receivable of $900-.docx
Capital Power and Light has Cash of $200- Accounts Receivable of $900-.docx
 
Can you think of a time that a company inverted the means and ends- or.docx
Can you think of a time that a company inverted the means and ends- or.docxCan you think of a time that a company inverted the means and ends- or.docx
Can you think of a time that a company inverted the means and ends- or.docx
 
Can it be solved with an equations shown- The stockhalders' equity acc.docx
Can it be solved with an equations shown- The stockhalders' equity acc.docxCan it be solved with an equations shown- The stockhalders' equity acc.docx
Can it be solved with an equations shown- The stockhalders' equity acc.docx
 

Recently uploaded

Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxjmorse8
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Celine George
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...Nguyen Thanh Tu Collection
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024CapitolTechU
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxnuriaiuzzolino1
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonMayur Khatri
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Denish Jangid
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Mark Carrigan
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
The Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfThe Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfdm4ashexcelr
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPragya - UEM Kolkata Quiz Club
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxSanjay Shekar
 

Recently uploaded (20)

Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptx
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
The Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfThe Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdf
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptx
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 

Can someone help me get a better understanding of StackInterface in ja.docx

  • 1. Can someone help me get a better understanding of StackInterface in java? I also am having trouble with some of these methods i need to write. public interface StackInterface<T> { /** * Add element to top of stack. * @param newEntry item to add to stack. */ public void push(T newEntry); /** * Remove and return top element from stack. * @return top element. * @throws EmptyStackException if the stack is empty */ public T pop(); /** * Return top element from stack without modifying stack. * @return Element on top of stack. * @throws EmptyStackException if the stack is empty */ public T peek(); /** * Whether stack is empty. * @return True if stack is empty, false otherwise.
  • 2. */ public boolean isEmpty(); /** * Remove all elements from stack. */ public void clear(); }