-
math
Find minimum of numbers with Math min
This is an example of how to find the minimum of numbers using the Math Class. The class Math contains…
Read More » -
math
Generate random numbers with Math random
With this example we are going to demonstrate how to generate random numbers using random() method of Math Class. The…
Read More » -
math
Calculate power with Math pow
In this example we shall show you how to calculate the power of a number using the pow(double a, double…
Read More » -
URL
Read text from URL
This is an example of how to parse text from a URL. The URL Class is used to represent a…
Read More » -
URL
Convert between URL and URI
With this example we are going to demonstrate how to convert between a URL and a URI. Class URL represents…
Read More » -
Socket
Write text to Socket
In this example we shall show you how to write text to a Socket. To write text to a Socket one…
Read More » -
Socket
Send HTTP POST request with Socket
This is an example of how to send an HTTP POST request with a Socket. A socket is an endpoint…
Read More » -
Socket
Create client Socket
With this example we are going to demonstrate how to create a client Socket in Java. In short, to create…
Read More » -
InetAddress
Get IP address and hostname from local machine
In this example we shall show you how to retrieve the IP address and hostname from the local host. To…
Read More » -
DatagramPacket
Send network DatagramPacket
This is an example of how to send a Datagram packet over the network in Java. Sending Datagram packets between…
Read More »