Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA
/ push
Method
push
11. Stack/stackArray.java:36–43 ·
view source on GitHub ↗
(double j)
Source
from the content-addressed store, hash-verified
34
}
35
36
public
void
push(double j) {
37
38
// check whether stack is full
39
if
(top == maxSize - 1)
40
System.out.println(
"Stack is full"
);
41
else
42
stackArray[++top] = j;
43
}
44
45
public
double pop() {
46
if
(top == -1)
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected