SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

BASIC / NOTES</>↗
Basic20 Oct 2010

How do I define a constant variable?

To define a constant in Java, use final modifier which combined with static modifier. The final modifier indicates that the value of this field cannot change. If you change the value of the constant, you need to recompile the class to get the current value. Other feature in Java that provide similar functionality is enumeration […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API20 Oct 2010

How do I calculate the length of hypotenuse?

Hypot is a mathematical function defined to calculate the length of the hypotenuse of a right-angle triangle. It was designed to avoid errors arising due to limited-precision calculations performed on computers. From: Wikipedia The Math.hypot(double x, double y) return the sqrt(x2+ y2) without intermediate overflow or underflow. The result will be same with this calculation […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API20 Oct 2010

How do I calculate exponential function?

In mathematics, the exponential function is the function ex, where e is the number (approximately 2.718281828) such that the function ex equals its own derivative. The function f(x) = ex at the point x = 0 is equal to 1. package org.kodejava.math; public class ExponentExample { public static void main(String[] args) { double x = […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API20 Oct 2010

How do I get the exponent of exponential function?

The exponential function is f(x) = ex. The Math.getExponent() method is used to get the x value of the given parameter, in which the parameter is a result of exponential function calculation. package org.kodejava.math; public class GetExponent { public static void main(String[] args) { double fx = 1.0d; float fx1 = 1.0f; int x = […]

Wayan · 1 min read
BASIC / NOTES</>↗
Basic19 Oct 2010

How do I use the “this” keyword in Java?

Every instance method has a variable with the name this that refers to the current object for which the method is being called. You can refer to any member of the current object from within an instance method or a constructor by using this keyword. Each time an instance method is called, the this variable […]

Wayan · 2 min read
BASIC / NOTES</>↗
Basic19 Oct 2010

How do I use the “return” keyword in Java?

The return keyword is used to return from a method when its execution is complete. When a return statement is reached in a method, the program returns to the code that invoked it. A method can return a value or reference type or does not return a value. If a method does not return a […]

Wayan · 2 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.