Author: saqibkhan

  • Set Values

    A tuple has setAtX() methods to set value at particular index. For example Triplet class has following methods. Feature Example Let’s see JavaTuples in action. Here we’ll see how to set values in a tuple using various ways. Create a java class file named TupleTester in C:\>JavaTuples. File: TupleTester.java Verify the result Compile the classes using javac compiler…

  • Get Values

    A tuple has getValueX() methods to get values and getValue() a generic method to get value by index. For example Triplet class has following methods. Feature Example Let’s see JavaTuples in action. Here we’ll see how to get values from a tuple using various ways. Create a java class file named TupleTester in C:\>JavaTuples. File: TupleTester.java…

  • Create Tuples

    A tuple using JavaTuple classes can be created using multiple options. Following are the examples − Using with() Methods Each tuple class has a with() method with corresponding parameters. For example − Using Constructor Each tuple class has a constructor with corresponding parameters. For example − Learn Java in-depth with real-world projects through our Java certification course. Enroll…

  • Environment Setup

    Local Environment Setup If you are still willing to set up your environment for Java programming language, then this section guides you on how to download and set up Java on your machine. Please follow the steps mentioned below to set up the environment. Java SE is freely available from the link Download Java. So you…

  • Overview

    Tuple Tuple is a sequence of objects which may or may not be of same type. Consider the following example − Above object is a tuple of three elements, an Integer, a string and a Connection Object. JavaTuple JavaTuples is a very simple library which offers ten different tuple classses which are sufficient to handle…

  • Database Application

    In the previous chapter, we created a sample RMI application where a client invokes a method which displays a GUI window (JavaFX). In this chapter, we will take an example to see how a client program can retrieve the records of a table in MySQL database residing on the server. Assume we have a table…

  • GUI Application

    In the previous chapter, we created a sample RMI application. In this chapter, we will explain how to create an RMI application where a client invokes a method which displays a GUI window (JavaFX). Defining the Remote Interface Here, we are defining a remote interface named Hello with a method named animation() in it. Developing the Implementation Class In…

  • RMI Application

    To write an RMI Java application, you would have to follow the steps given below − Defining the Remote Interface A remote interface provides the description of all the methods of a particular remote object. The client communicates with this remote interface. To create a remote interface − Following is an example of a remote…

  • Introduction

    RMI stands for Remote Method Invocation. It is a mechanism that allows an object residing in one system (JVM) to access/invoke an object running on another JVM. RMI is used to build distributed applications; it provides remote communication between Java programs. It is provided in the package java.rmi. Architecture of an RMI Application In an RMI application,…

  • No Overload

    A class is not allowed to have two overloaded methods that can have the same signature after type erasure.