SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API25 Apr 2007

How do I create a queue using LinkedList class?

package org.kodejava.util; import java.util.LinkedList; import java.util.Queue; public class QueueDemo { public static void main(String[] args) { // Create an instance of a queue, ere we use the LinkedList class which // implements the Queue interface. Add some elements to the queue using // the offer method. Queue<String> queue = new LinkedList<>(); queue.offer("First visitor"); queue.offer("Second visitor"); […]

Wayan · 2 min read
SWING / NOTES</>↗
Swing21 Apr 2007

How do I handle a window closing event in Swing?

Here you will see how to handle the window closing event of a JFrame. What you need to do is to implement a java.awt.event.WindowListener interface and call the frame addWindowListener() method to add the listener to the frame instance. To handle the closing event implements the windowClosing() method of the interface. Instead of implementing the […]

Wayan · 2 min read
SWING / NOTES</>↗
Swing21 Apr 2007

How do I close a JFrame application?

Closing a JFrame application can be done by setting the default close operation of the frame. There are some defined constants for the default operation. These constants defined in the javax.swing.WindowConstants interface include EXIT_ON_CLOSE, HIDE_ON_CLOSE, DO_NOTHING_ON_CLOSE and DISPOSE_ON_CLOSE. To exit an application we can set the default close operation to EXIT_ON_CLOSE, this option will call […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API16 Apr 2007

How do I create a method that accept varargs in Java?

Varargs (variable arguments) is a new feature in Java 1.5 which allows us to pass multiple values in a single variable name when calling a method. Of course, it can be done easily using array but the varargs add another power to the language. The varargs can be created by using three periods (…) after […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API15 Apr 2007

How do I use the Stack class in Java?

Stack is an extension of the java.util.Vector class that provided a LIFO (last-in-first-out) data structure. This class provide the usual method such as push() and pop(). The peek method is used the get the top element of the stack without removing the item. package org.kodejava.util; import java.util.Stack; public class StackExample { public static void main(String[] […]

Wayan · 2 min read
SERVLET / NOTES</>↗
Servlet13 Apr 2007

How do I set the maximum age of a cookie?

package org.kodejava.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(name = "CookieExpirationServlet", urlPatterns = "/cookie-expiration") public class CookieExpirationServlet extends HttpServlet { @Override protected void doGet(H...

Wayan · 1 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.