Home » Archives for Katerina Zamani » Page 2

Author Archives: Katerina Zamani

Avatar photo
Katerina has graduated from the Department of Informatics and Telecommunications in National and Kapodistrian University of Athens (NKUA) and she attends MSc courses in Advanced Information Systems at the same department. Currently, her main academic interests focus on web applications, mobile development, software engineering, databases and telecommunications.

Java String to Float Example

Bipartite Graph

float is a frequently used data type of 32-bit and it represents decimal numbers. The main difference from double is that it requires smaller size in memory but in some situations (big numbers) doesn’t represent the accurate number. A commonly used procedure in Java is the convertion from string to float. In this example we shall show you all the ...

Read More »

Java StringTokenizer Example

Bipartite Graph

StringTokenizer class in Java is a class from java.util package. It allows us to break a string into tokens. Here, we show the use of String Tokenizer class, as well as some of its basic operations. The JDK version we use to compile the source code in this example is OpenJDK 13 and the IDE we use is Eclipse IDE ...

Read More »

Java string to long Example

Bipartite Graph

Long class forms the primitive type long, which can represent an integer number of 32 bits (2^32). A very common procedure in Java programming is the conversion of String to Long. As you can expect, in this example we are going to show how to convert a string to long in every possible way.         1. Syntax ...

Read More »

String to Double Java Example

Bipartite Graph

In this article, we will show you how to convert string to double in java. String to Double conversion in Java is a frequent procedure because both data types are commonly used. As you can imagine in this example we are going to show all the possible ways of converting String object to Double object. 1. Syntax of the convert ...

Read More »

Java PrintWriter Example

Bipartite Graph

In this example, we are going to look at the PrintWriter class in Java. We will create a printwriter java example and we will print some common data types to the standard output as well as to a file using PrintWriter class. 1. What is the Java PrintWriter class Java provides the PrintWriter class to print formatted and human-readable data ...

Read More »

Java number format Example

Bipartite Graph

There are many situations that we want to have a specific format in some numbers of our java applications. Depending on the format of the number, this may be done with different ways. Generally for a more well-written code and a more dynamic way, it is recommended the use of DecimalFormat class. This class give us the manner of formatting ...

Read More »

Math.random Java Example

Bipartite Graph

In this article, we will explain Math.random method in Java through examples. Java provides us Math class, which includes methods with basic numeric operations such as logarithm, square root, etc. One of these methods is random(), which gives us a pseudorandom positive double number greater than or equal to 0.0 and less than 1.0 – [0.0, 1.0). You can learn ...

Read More »

Android Custom Components Example

Although Android provides us many built-in components, such as Button, TextView etc, it also offers us the opportunity to create our own custom widgets in order to adjust them to our needs and our requirements. Depending on the customization of the component, we can extend it to an existing built-in widget or to a class that we have created or ...

Read More »

Java GridLayout Example

Bipartite Graph

The grid layout Java represents a layout manager with a specified number of rows and columns. Every rectangle cell at Gridlayout java has the same size and contains a component, which fills in the entire size of the cell. In this example, we are going to design a simple calculator using GridLayout, where the grid will contain simple components. 1. ...

Read More »

Java ExecutorService Example – Tutorial

Bipartite Graph

Java ExecutorService is an interface that extends Executor class and represents an asynchronous execution. Executor service provides us mechanisms to manage the end and detect progress of the asynchronous tasks. In this example, we are going to see some basic functionalities of ExecutorService, as well as handle the Future object, the result of asynchronous computation. 1. Runnable vs Callable The ...

Read More »