Python provides the tuple data structure An immutable sequen
Solution
That is correct to say that tuple data structre doesn\'t have in Java..likewise they have in Python. Tuples contains number of values seperated by commas and other functions and they are immutable. You would extend the abstract class to make sure that tuple data structure is implemented.
public class Tuple {
private Object[] arr;
private int size;
private static boolean TypeLock = false;
private static Object[] lastTuple = {1,1,1}; //default tuple type
private Tuple(Object ... c) { // Extending of the abstract class of tuple from public to private
// TODO Auto-generated constructor stub
size=c.length;
arr=c;
The function such as it would take an array of objects as its only parameter.
if (p.arr[i].getClass() == this.arr[i].getClass())
{
if (!this.arr[i].equals(p.arr[i])) // Array declaration and usage of the same in the program
return false;
}
else
The contents of the parameter of the same had to be passed to the array to execute the overall functions of the program.
