Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CORE API / CATATAN</>
Core API17 Mar 2010

How do I calculate logarithm?

We can calculate logarithm using the Math.log10() and the Math.log() static method call. package org.kodejava.math; public class LogarithmExample { public static void main(String[] args) { double number1 = 1000.0d; // Get common logarithm double log10 = Math.log10(number1); System.out.println("Common logarithm of " + number1 + " = " + log10); // Get natural logarithm double loge […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API16 Mar 2010

How do I round a number?

The example below show you some methods of the Math class that can be used to round the value of a number. These methods are Math.ceil(), Math.floor() and Math.round(). package org.kodejava.math; public class GetRoundedValueExample { public static void main(String[] args) { Double number = 1.5D; // Get the smallest value that is greater than or […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API12 Mar 2010

How do I calculate cube root and square root of a number?

To calculate the cube root and the square root of a double value we can use the Math.cbrt(double a) and Math.sqrt(double a) static method call. package org.kodejava.math; public class CubeSquareRootExample { public static void main(String[] args) { double cube = 125.0d; double square = 100.0d; // Get the cube root of double value double cubeRoot […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API09 Mar 2010

How do I reread the content of a buffer?

The example shown below tells you how to reread the contents of a buffer. To reread the data from a buffer we can use the buffer’s rewind() method. This method set the position back to 0 while the limit is unchanged, it still holds the value of how many data can be read from the […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API09 Mar 2010

How do I use trigonometric calculation methods?

This example demonstrates how to use the trigonometric methods of the java.lang.Math class. You can see the use of method such as Math.sin(), Math.cos(), Math.tan(), etc. package org.kodejava.math; public class TrigonometricExample { public static void main(String[] args) { double radians = 1.0d; double sine = Math.sin(radians); double cosine = Math.cos(radians); double tan = Math.tan(radians); double […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API06 Mar 2010

How do I convert angle from radians to degrees?

The example below show you how to convert an angle measured in radians into degrees and vice versa. We can use the Math.toDegrees() and Math.toRadians() method call to do the conversion. package org.kodejava.math; public class RadiansDegreeConversionExample { public static void main(String[] args) { double radians = 1.0d; double degrees = 45d; // Converts an angle […]

Wayan · 1 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.