Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jean y
Java Web Development Techdegree Student 2,074 PointsLook the really cool code I made
one I didn't make this one but its really cool
public class Queue {
char q[]; // this array holds the queue
int putLoc, getLoc; // the put and get indices
Queue(int size) {
q = new char[size]; //allocate memory for queue
putLoc = getLoc = 0;
}
//Put a character into the queue
void put(char ch) {
if putLoc == q.length {
System.out.println(" - Oueue is full.");
return;
}
q[putLoc++] = ch;
}
}