<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Java Samples]]></title>
<link><![CDATA[https://java-samples.com]]></link>
<description><![CDATA[Comments]]></description>
<generator>Commentics</generator>
<item>
<title>Morgan</title>
<link><![CDATA[https://www.java-samples.com/showtutorial.php?tutorialid=374&cmtx_perm=23#cmtx_perm_23]]></link>
<description><![CDATA[<p>To create a simulation of a stack in Java without using internal libraries, you can create a class that implements a stack data structure. Here is an example implementation:</p><p></p><div class="cmtx_code_box">public class Stack {<br /> private int maxSize; // size of stack array<br /> private int[] stackArray;<br /> private int top; // top of stack<br /><br /> public Stack(int size) {<br /> maxSize = size;<br /> stackArray = new int[maxSize];<br /> top = -1;<br /> }<br /><br /> public void push(int value) {<br /> stackArray[++top] = value;<br /> }<br /><br /> public int pop() {<br /> return stackArray[top--];<br /> }<br /><br /> public int peek() {<br /> return stackArray[top];<br /> }<br /><br /> public boolean isEmpty() {<br /> return (top == -1);<br /> }<br /><br /> public boolean isFull() {<br /> return (top == maxSize - 1);<br /> }<br />}<br /></div>]]></description>
<pubDate>Thu, 11 May 2023 21:06:36 +0800</pubDate>
<guid isPermaLink="false">item_23</guid>
</item>
<item>
<title>cakka</title>
<link><![CDATA[https://www.java-samples.com/showtutorial.php?tutorialid=374&cmtx_perm=17#cmtx_perm_17]]></link>
<description><![CDATA[<p>how to create a simulation of java stack without using internal library ?</p>]]></description>
<pubDate>Thu, 11 May 2023 19:47:12 +0800</pubDate>
<guid isPermaLink="false">item_17</guid>
</item>
</channel>
</rss>