MyClass.java Source code

Java tutorial

Introduction

Here is the source code for MyClass.java

Source

class MyClass<T> {
    T ob;

    MyClass(T o) {
        ob = o;
    }

    T getob() {
        return ob;
    }
}

public class Main {
    public static void main(String args[]) {
        MyClass raw = new MyClass(new Double(98.6));
        double d = (Double) raw.getob();
        System.out.println("value: " + d);
    }
}