Home » Archives for Sotirios-Efstathios Maneas » Page 4

Author Archives: Sotirios-Efstathios Maneas

Sotirios-Efstathios (Stathis) Maneas is a PhD student at the Department of Computer Science at the University of Toronto. His main interests include distributed systems, storage systems, file systems, and operating systems.

Comparable Java Example

In this tutorial, we will discuss Java comparable objects. Java provides the Comparator interface and the Comparable interface, which contains only one method, called compareTo. This method compares two objects, to impose an order between them. Specifically, it returns a negative integer, zero, or a positive integer to indicate that the input object is less than, equal to or greater than the existing ...

Read More »

Java Scanner example

In this tutorial we will discuss about scanners in Java. A Scanner in Java is a simple text scanner which can parse primitive types and strings using regular expressions. A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace. The resulting tokens may then be converted into values of different types. The Scanner class ...

Read More »

Java Inheritance Example

In this tutorial, we will discuss the inheritance in Java. The most fundamental element of Java is the class. A class represents an entity and also, defines and implements its functionality. In Java, classes can be derived from other classes by using the extends keyword, in order to create more complex relationships. You can also check this tutorial in the ...

Read More »

Enumeration Java Example

In this tutorial we will discuss about Java Enumeration. The Java programming language contains the enum keyword, which represents a special data type that enables for a variable to belong to a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. The values defined inside this command are constants ...

Read More »

Java Dictionary example

In this tutorial we will discuss about dictionaries in Java. A Dictionary is an abstract class that maps keys to values. Every key is associated with a unique value and key are unique. Any non-null object can be used for either a key or a value. An attempt to insert either a null key or a null value to a ...

Read More »

Java Calendar Example (with video)

In this tutorial, we will explain the Calendar class in Java – java.util.Calendar using an example. 1. Introduction The Calendar is an abstract class that provides methods for converting between time and calendar fields. Also, the class provides fields and methods for implementing a concrete calendar system. The Calendar field values can be set by calling the following methods: set, ...

Read More »

Java Map Example

In this post, we feature a comprehensive Java Map Example. We will discuss about Maps in Java. A Map is an interface that maps keys to values. The keys are unique and thus, no duplicate keys are allowed. A map can provide three views, which allow the contents of the map to be viewed as a set of keys, collection ...

Read More »

Java programming tutorial – Getting started with Java

In this tutorial we will discuss about the Java programming language and how to develop and execute our first application. Java is an object oriented programming language that aims for portability, high performance, robustness and security. The Java Compiler is used to transform the Java source files to bytecode, which can be executed by the Java Runtime Environment (JRE). Moreover, ...

Read More »

Encapsulation Java Example

In this tutorial we will discuss about Encapsulation in Java. Encapsulation is the mechanism for restricting access to an object’s components. It aims for high maintenance and handling of the application’s code. Also, the encapsulation mechanism protects the members of a class from external access, in order to be protected against unauthorized access. You can also check this tutorial in ...

Read More »

Java XML parser Tutorial

In this tutorial, we will discuss the Java XML parser or how to read XML files. XML is a markup language that defines a set of rules for encoding documents. Java offers a number of libraries in order to parse and process XML documents. Java xml parser examples provides the required functionality to read and modify an XML file. The ...

Read More »