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 API23 Jan 2008

How do I know if a class object is an interface or a class?

package org.kodejava.lang; public class CheckForInterface { public static void main(String[] args) { // Checking whether Cloneable is an interface or class Class<?> clazz = Cloneable.class; boolean isInterface = clazz.isInterface(); System.out.println(clazz.getName() + " is an interface = " + isInterface); // Checking whether String is an interface or class clazz = String.class; isInterface = clazz.isInterface(); System.out.println(clazz.getName() […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API20 Jan 2008

How do I get interfaces implemented by a class?

The getClass().getInterfaces() method return an array of Class that represents the interfaces implemented by an object. package org.kodejava.lang; import java.util.Date; import java.util.Calendar; public class ClassInterfaces { public static void main(String[] args) { // Get an instance of Date class Date date = Calendar.getInstance().getTime(); // Get all interfaces implemented by the java.util.Date class and // print […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API19 Jan 2008

How do I get package name of a class?

To get the package name of a class we can use the getClass().getPackage() method of the inspected object. package org.kodejava.lang; import java.util.Date; public class GetPackageName { public static void main(String[] args) { // Create an instance of Date class, and then obtain the class package // name. Date date = new Date(); Package pack = […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API18 Jan 2008

How do I get super class of an object?

To get the super class of an object we can call the object’s getClass() method. After getting the class type of the object we call the getSuperclass() method to get the superclass. Let’s see the code snippet below. package org.kodejava.lang; public class ObtainingSuperClass { public static void main(String[] args) { // Create an instance of […]

Wayan · 1 min read
REGEX / NOTES</>↗
Regex15 Jan 2008

How do I split up string using regular expression?

This code snippet uses the java.util.regex.Pattern.split() method to split-up input string separated by commas or whitespaces (spaces, tabs, new lines, carriage returns, form feeds). package org.kodejava.regex; import java.util.regex.Pattern; public class RegexSplitExample { public static void main(String[] args) { // Pattern for finding commas, whitespaces (spaces, tabs, new lines, // carriage returns, form feeds). String pattern […]

Wayan · 1 min read
JDBC / NOTES</>↗
JDBC10 Jan 2008

How do I get a list of stored procedure names?

package org.kodejava.jdbc; import java.sql.*; public class StoredProcedureListExample { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; private static final String PASSWORD = "s3cr*t"; public static void main(String[] args) { try (Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)) { DatabaseMetaData metadata = conn.getMetaData(); ResultSet result = metadata.getProcedures("kodejava", "...

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.