Accessing a Sub class variable in a Super Class

Hi ,
Is there any easiest way to access a Subclass Variable in a Super Class.
Class Super1{
Class sub extends Super1
private String substring1;
In my application the 'substring1' values is not null .But all fields in Super1 class are null .
How can i access the value of the Subclass Variable in Super class .
Thanks

This would be a way to make the superclass dependent on subclass behavior. Of course this only makes sense if getSubString() is likely to have multiple different implementations in different subclasses.
public abstract class Super {
  public String getString() {
   return "SuperString" + getSubString();
  protected abstract String getSubString();
public class Sub extends Super {
  private String substring;
  protected String getSubString() {
   return substring;
}Using this just to access a variable whose contents differ from subclass to subclass is overkill. If you want each subclass to provide a different substring, create a constructor with a substring parameter in the superclass instead:public class Super {
  private String substring;
  protected Super(String substring) {
   this.substring = substring;
  public String getString() {
   return "SuperString" + substring;
public class Sub extends Super {
  public Sub() {
   super("substring");
}

Similar Messages

  • Accessing a variable form a super class

    Hi guys, its my first post in this forum, i am student and learning some java. I find it very interesting but have some problems
    My question is : How to access a variable from a superclass
    Here is my program:
    class superclass
         int i = 10, j= 20;
         void display()
         System.out.println("i in super is:" +i);
         System.out.println("j in super is:" +j);
    class child extends superclass
         int i,j;
         void display()
         System.out.println("i in child is:" +i);
         System.out.println("j in child is:" +j);
    class prgdemo
         public static void main(String args[])
         superclass s =new superclass();
         s.display();
         child c = new child();
         c.display();
    }Thanks for your replies

    This is only true of nested subclasses. Private
    fields are HIDDEN to ALL code contained outside of
    the enclosing class.You are a very bad racist man:class superclass {
         private int i = 10;
         private int j= 20;
         public class child extends superclass
              int i= 42,j= 54;
              void display()
              System.out.println("i in child is:" +i);
              System.out.println("j in child is:" +j);
              System.out.println("super's i is:" +super.i);
              System.out.println("super's j is:" + super.j);
              System.out.println("outer's i is:" + superclass.this.i);
              System.out.println("outer's j is:" + superclass.this.j);
         void display()
         System.out.println("i in super is:" +i);
         System.out.println("j in super is:" +j);
    }kind regards,
    Jos (eeeww!)

  • Accessing super class  private variables from derived class

    posted November 01, 2005 08:20 PM Profile for kenji mapes Email kenji mapes Send New Private Message Edit/Delete Post Reply With Quote Assume I have a default and a param constructor in both a subclass and a super class. The members are private.
    So after validation logic in the sub class param. constructor, I want to access an instance variable of the super class's default constructor to set the subclass's matching variable to the default in the super class.
    Is there anyway I can do this. Of course, I have inherited setters and getters.
    Thanks.

    posted November 01, 2005 08:20 PM Profile for
    kenji mapes Email kenji mapes Send New Private
    Message Edit/Delete Post Reply With QuoteI suppose this is the result of an attempted crossposting from another forum. :)

  • Private or Protected access for super class variables

    What is the best practice...
    Assume there is a class hierachy like
    Person (Super class) / StaffMember/ Professor (Sub class)
    1) The best way is to keep all the instance variables of each and every class private and access the private variables of super classes through subclass constructors (calling "super()")
    Ex:-
    public class Person {
    private String empNo;
    public Person (String empNo) {
    this.empNo = empNo;
    public class Professor extends Person {
    private String ........;
    private int ...........;
    public Professor (String pEmpNo) {
    super(pEmpNo);
    OR
    2)Changing the access level of the super class variables into "protected" or "default" and access them directly within the sub classes...
    Ex:-
    public class Person {
    protected String empNo;
    public Person () {
    public class Professor extends Person {
    String ........;
    int ...........;
    public Professor (String empNo) {
    this.empNo = empNo;
    Thank you...

    i'd think that you'd be better off relaying your initial values through the super class's constructor that way you'll get cleaner code, there's a possibly of inconsistency with option 2. i.e. you can then write code in your super classes to generally handle and properly initialize the instance variables while in the case of option 2, you'll have arbitrary constructors performing arbitrary initialization procedures

  • How to access class variables in anonymous class??.

    I have a boolean class level variable. Fom a button action , this boolean will set to true and then it used in anonymous class. In anonymous class, I am getting default value instead of true. Could u anyone help in this plzzz.

    first of all, you don't want parent because that is something that Containers use to remember their containment hierarchy. you are thinking of super which is also incorrect, because that has to do with inheritance.
    the problem here is a scoping problem. you generally would use final if you were accessing variables in an anonymous class that are in the local scope. in this case, you just need to create some test code and play with it. snip the code below and play with it. it shows both the given examples and some additional ways to change/display class variables.
    good luck, hackerx
    import javax.swing.*;
    import java.awt.event.*;
    public class Foo extends JPanel
         private boolean the_b = true;
         public static void main(String[] args)
              Foo f = new Foo();
              JFrame frame = new JFrame();
              frame.getContentPane().add(f);
              frame.pack();
              frame.show();
         public Foo()
              // get your button
              JButton b = new JButton("Not!");
              b.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        // *** uncomment these to play around ***
                        // Foo.this.the_b = false; // this will work, but unnecessary
                        // the_b = false; // this works fine too
                        notFoo();
              this.add(b);
              // something to show the value that accesses a class variable
              // using an inner class instead of final nonsense
              DisplayThread t = new DisplayThread();
              t.start();
         private void notFoo()
              the_b = !the_b;
         class DisplayThread extends Thread
              public void run()
                   while(true)
                        System.err.println("boolean value: " + the_b);
                        try {
                        sleep(1000);
                        } catch(InterruptedException ie) {}
    }

  • Outer Class Accessing Inner Classes Variables

    Hi Everyone,
    Should an outer class directly access the private member variables of its inner class? Or should it get their values by calling an appropriate 'getXXX()' method?
    Just wondering.
    Thx.

    If the outer class trys to access the variable that is declared in the inner class with in a class and outside the method, then it can access in the following example
    class outer
         private int x=10;
         class inner
              int y=20;
         public void getOutput()
              inner in=new inner();
              System.out.println("The value of y is" +in.y);
         public static void main(String args[])
              outer out=new outer();
              out.getOutput();
    };

  • How to access an element using its name or id if it is not a class variable?

    I am trying to retrieve the element I added to my UI in a different  function. I am using actionscript 3. I know I can put the variable into a  class variable, so it can be access anywhere in the class, but I have  too many elements. Is there anyway I could access them without putting  them into class variable?
    Thanks.
    public class Test extends SkinnableContainer{
    // private var image:Image; <-- I try not to do this, too messy
    private function func1() {
        var image:Image = new Image();
        addElement(image);
    private function func2() {
        var image:Image = /* how to get the element from my UI without putting into class variable */

    Here is what works for me:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   creationComplete="init()"
                   minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import spark.components.Image;
                private var  image:Image;
                private function init():void
                    image = new Image();
                    addElement(image);
                    trace(this["image"]);
            ]]>
        </fx:Script>   
    </s:Application>

  • Calling a particular Method of all subclass from a super class

    hi
    I have a class 'A' which is a super class for 'B' ,'C' , 'D'
    my main method is in the class Main and while on the run i am calling methods of B,C,D form this main class.
    but as the first step of execution i need to call a init method which has been defined in all the sub-classes. and there can be any no of sub-classes and all will have the init method and i have to call the init method for all classes. is this possible to do that in runtime. ie i wil not be knowing the names of sub-classes.
    thanks
    zeta

    Sorry if i had mislead you all.
    I am not instantiating from my super class.
    as mjparme i wanted one controller class to do the
    init method calls
    so i got it working from the link you gave.
    URL url = Launcher.class.getResource(name);
    File directory = new File(url.getFile());
    This way i can get all the classes in that
    in that package
    and from reflection i can get whether it is
    her it is a sub class of the particular super class
    and i can call the init methods by making the init
    methods static
    thanks for the help
    zetaThis is a rather fragile solution.
    If the problem is one of knowing which subclasses exist, I would suggest specifying them explicitly via configuration (system property or properties file or whatever).
    One thing that's not entirely clear to me: Is the init going to be called once for each subclass, or once for each instance of each subclass? It sounds to me like it's once per class, but I want to make sure.

  • Inherited methods of super class not shown in outline

    Hello, is there a possibility to display the methods and variables from the super class in the outline of the inheriting class in AiE?

    Hi Christian,
    We had discussed this, when we implemented the outline and quick outline some years, ago. Finally, we sticked to the approach that is used by other plug-ins in Eclipse (like JDT).
    There Outline View shows only the content of the current editor. This helps to keep the content of the view stable when you select an element for navigation (because you won't be able to switch the editor by selecting an element ).
    Inherited members are usually part of other editors, unless you have redefined a method in your current class. Therefore, they are not shown in Outline View (unless they are redefinitions).
    The filters like "Hide Non-Public Members of classes" can only hide elements of the current editor.
    Inherited members can be shown in the Quick Outline, because the interaction pattern is different there: If you navigate to an element the pop-up is closed. Therefore, a content change of the Quick-Outline does not hurt.
    Michael

  • Regarding Super classes

    Hi,
    I have created one class in SE24. This class will be used as a super class for other classes.
    When subclasses are derived from this superclass, i want to make sure that some of the methods of superclasses are redefined by the subclasse compulsarily.
    So i want to force the subclasses to redefine complusarily some of the methods of its super class.
    Is this feasible. If so please let me know the corresponding approach.
    Thanks in advance !
    Pramod

    Hi,
    Check this out this will help you.
    Inheritance is the concept of passing the behavior of a class to another class.
    1.You can use an existing class to derive a new class.
    2.Derived class inherits the data and methods of a super class.
    3.However they can overwrite the methods existing methods and also add new once.
    4.Inheritance is to inherit the attributes and methods from a parent class.
    Inheritance:
    Inheritance is the process by which object of one class acquire the properties of another class.
    Advantage of this property is reusability.
    This means we can add additional features to an existing class with out modifying it.
    Go to SE38.
    Provide the program name.
    Provide the properties.
    Save it.
    Provide the logic for inheritance.
    *& Report  ZLOCALCLASS_VARIABLES                      *
    *&----------------------------------------------------*REPORT  ZLOCALCLASS_VARIABLES.
    *OOPS INHERITANCE
    *SUPER CLASS FUNCTIONALITY
    *DEFINE THE CLASS.
    CLASS CL_LC DEFINITION.
    PUBLIC SECTION.
    DATA: A TYPE I,
          B TYPE I,
          C TYPE I.
    METHODS: DISPLAY,
             MM1.
    CLASS-METHODS: MM2.
    ENDCLASS.
    *CLASS IMPLEMENTATION
    CLASS CL_LC IMPLEMENTATION.
    METHOD DISPLAY.
    WRITE:/ 'THIS IS SUPER CLASS' COLOR 7.
    ENDMETHOD.
    METHOD MM1.
    WRITE:/ 'THIS IS MM1 METHOD IN SUPER CLASS'.
    ENDMETHOD.
    METHOD MM2.
    WRITE:/ 'THIS IS THE STATIC METHOD' COLOR 2.
    WRITE:/ 'THIS IS MM2 METHOD IN SUPER CLASS' COLOR 2.
    ENDMETHOD.
    ENDCLASS.
    *SUB CLASS FUNCTIONALITY
    *CREATE THE CLASS.
    *INHERITING THE SUPER CLASS.
    CLASS CL_SUB DEFINITION INHERITING FROM CL_LC. "HOW WE CAN INHERIT
    PUBLIC SECTION.
    DATA: A1 TYPE I,
          B1 TYPE I,
          C1 TYPE I.
    METHODS: DISPLAY REDEFINITION,     "REDEFINE THE SUPER CLASS METHOD
             SUB.
    ENDCLASS.
    *CLASS IMPLEMENTATION.
    CLASS CL_SUB IMPLEMENTATION.
    METHOD DISPLAY.
    WRITE:/ 'THIS IS THE SUB CLASS OVERWRITE METHOD' COLOR 3.
    ENDMETHOD.
    METHOD SUB.
    WRITE:/ 'THIS IS THE SUB CLASS METHOD' COLOR 3.
    ENDMETHOD.
    ENDCLASS.
    *CREATE THE OBJECT FOR SUB CLASS.
    DATA: OBJ TYPE REF TO CL_SUB.
    START-OF-SELECTION.
    CREATE OBJECT OBJ.
    CALL METHOD OBJ->DISPLAY. "THIS IS SUB CLASS METHOD
    CALL METHOD OBJ->SUB.
    WRITE:/'THIS IS THE SUPER CLASS METHODS CALLED BY THE SUB CLASS OBJECT'COLOR 5.
    SKIP 1.
    CALL METHOD OBJ->MM1.     "THIS IS SUPER CLASS METHOD
    CALL METHOD OBJ->MM2.
    *CREATE THE OBJECT FOR SUPER CLASS.
    DATA: OBJ1 TYPE REF TO CL_LC.
    START-OF-SELECTION.
    CREATE OBJECT OBJ1.
    SKIP 3.
    WRITE:/ 'WE CAN CALL ONLY SUPER CLASS METHODS BY USING SUPER CLASS OBJECT' COLOR 5.
    CALL METHOD OBJ1->DISPLAY. "THIS IS SUPER CLASS METHOD
    CALL METHOD OBJ1->MM1.
    CALL METHOD OBJ1->MM2.
    This example will help you to solve your problem.
    For more detailed information GOTO -> SAPTECHNICAL ->Tutorials -> Object Oriented Programming.
    Regards Madhu.
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:13 PM

  • Trying to use super class's methods from an anonymous inner class

    Hi all,
    I have one class with some methods, and a second class which inherits from the first. The second class contains a method which starts up a thread, which is an anonymous inner class. Inside this inner class, I want to call a method from my first class. How can I do this?
    If I just call the method, it will use the second class's version of the method. However, if I use "super," it will try to find that method in the Thread class (it's own super class) and complain.
    Any suggestions?
    Code:
    public class TopClass
         public void doSomething(){
              // do something
    =============================
    public class LowerClass extends TopClass
         // overrides TopClass's doSomething.
         public void doSomething(){
              // do something
         public void testThread(){
              Thread t = new Thread(){
                   public void run(){
                        doSomething();               //fine
                        super.doSomething();          //WRONG: searches class Thread for doSomething...
              t.start();
    }

    Classes frequently call the un-overridden versions of methods from their superclasses. That's that the super keyword is for, if I'm not mistaken.You're not mistaken about the keyword, but you're not calling the superclass method from a subclass. Your anonymous inner class is not a subtype of TopLevel. It's a subtype of Thread.
    Here it is no different, except that I happen to be in a thread at the time.It's vastly different, since you're attempting to call the method from an unrelated class; i.e., Thread.
    I could also be in a button's action listener, for example. It seems natural to me that if I can do it in a method, I should be able to do it within an anonymous inner class which is inside a method.If you were in an button's action listener and needed to call a superclass' implementation of a method overridden in the button, I'd have the same questions about your design. It seems smelly to me.
    ~

  • Even i call this() paramerterised constuctor in my class, Is super class su

    Even i call this() paramerterised constuctor in my class, Is super class super() parameter less constuctor invokes?
    I have excuted the following program. And result will be as follows:
    Grandparent() constructor
    Parent 25 constructor
    Parent() constructor
    Child() constructor
    The program is below:
    class ConstructorChain {
    public static void main(String[] args) {
    Child c = new Child();
    class Child extends Parent {
    Child() {
    System.out.println("Child() constructor");
    class Parent extends Grandparent {
    Parent() {
    this(25);
    System.out.println("Parent() constructor");
    Parent(int x) {
    System.out.println("Parent(" + x + ") constructor");
    class Grandparent {
    Grandparent() {
    System.out.println("Grandparent() constructor");
    for this my excepected answer is
    Parent 25 constructor
    Parent() constructor
    Child() constructor
    because in parent class i defined this() constructor so, as my undersatnd is it never call Grand Parent Constructor as it is default parameterless constructor.
    please Advise me
    Aruna

    You can't initialize a class without it's super classes constructor being run. So even if you call another constructor (of the same class), the parent classes constructor will still be called.

  • Class variable

    Hi everybody,
    In the following code, I want to set the class variable fileChanged to true after I called CheckFileThread class. It seems since CheckFileThread is a thread, after the timer is cancelled I won't come back to point1. How can I set the class variable thru other class?
    Any help is greatly appreciated. Thanks.
    import java.util.*;
    import java.lang.Thread;
    class testClass6
        private static boolean fileChanged = false;
        public static void main(String[] Args)
         testClass6 t = new testClass6();
         t.execute();
        public void execute()
         new CheckFileThread();     
    //point1
    // I want to check when the class variable: fileChanged becomes true.
         if (!fileChanged)
             System.out.println("Class variable fileChanged is false.");
         else
             System.out.println("Class variable fileChanged is now true.");
        class CheckFileThread
         CheckFileThread()
             Calendar rightNow = Calendar.getInstance();
             Date time = rightNow.getTime();
             System.out.println("This is time: " + time);
             new Reminder3(time);
         class Reminder3
             Timer timer;
             public Reminder3(Date time)
              timer = new Timer();
              timer.schedule(new RemindTask3(), time, 1*1000);
             class RemindTask3 extends TimerTask
              int a = 3;
              public void run()
                  if (a > 0)
                       System.out.println("I'm inside run. This message will print out every sec!");
                       a--;               
                  else
                       System.out.println("Times up!");
                       timer.cancel();
                       System.out.println("Setting the class variable to true...");
                       fileChanged = true;
              }//endof m:run
             }//endof class:RemindTask3
         }//endof class:Reminder3
        }//endof class: CheckFileThread
    } //endof class: testClass6

    Thanks for the reply. That's what I'm trying to do:
    method: execute() creates many theards and they start running. Now at one point I have to check if an input file changed since last modification. If NO, nothing changes; if YES, I have to stop all running threads and create new threads. The method that checks if input file has changed or not, it's a thread on its own that runs every 24 hours. It's a seperate class inside execute() but it seems I can't set the class variable: fileChanged thru that class. Below is a small code that says what I am trying to do. Sorry if I made you confused!
    import java.util.*;
    import java.lang.Thread;
    class testClass6
        private volatile static boolean fileChanged = false;
        public static void main(String[] Args)
         testClass6 t = new testClass6();
         t.execute();
        public void execute()
    // Creates threads and they are running.
    // Lot's of threads are running, I check if the class variable: fileChanged is true or not every 24 hours. If it's
    // true, I have to stop all running threads.
         new CheckFileThread();     
         if (!fileChanged)
             System.out.println("Class variable fileChanged is false.");
         else
             System.out.println("Class variable fileChanged is now true thru another class.");
    // It's a thread that runs every 24 hours
        class CheckFileThread
         CheckFileThread()
    // Here check to see if the file changed since last modification, if yes, set fileChanged = true
         }//endof class: CheckFileThread
    } //endof class: testClass6

  • Recursive get inheritance family , but It stop at It's super class.

    I make this class for the purpose to getting specified class name's inheritance family.
    import java.util.*;
    import java.lang.reflect.Field;
    // A simple class for getting specify class name's super class family.
    // Usage: java GetSuperClass java.util.ArrayList.
    public class GetSuperClass {
      //recursive get super class.
      public static void get(String str) {
        Class ref = null;
        try {
          // get Class Objcet.
          ref = Class.forName(str);
        } catch(ClassNotFoundException e) {
          e.printStackTrace(System.err);
          System.exit(0);
          System.out.println(ref);
          System.out.println("field:");
          // get fields
          Field[] field = ref.getDeclaredFields();
          for(int i = 0; i < field.length; i++) {
            System.out.println(field);
    //get super class
    Class superClass= ref.getSuperclass();
    //recursive call get()
    if(superClass != null) {
    get(superClass.toString());
    return;
    public static void main(String[] args) {
    // must input a class name for getting super class family.
    if(args.length != 1) {
    System.out.println("incorrect parameters");
    System.exit(0);
    // call static method to start.
    get(args[0]);
    Input as into console command prompt.
    java GetSuperClass java.util.ArrayListHere is result:
    class java.util.ArrayList
    field:
    private static final long java.util.ArrayList.serialVersionUID
    private transient java.lang.Object[] java.util.ArrayList.elementData
    private int java.util.ArrayList.size
    java.lang.ClassNotFoundException: class java.util.AbstractList
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at GetSuperClass.get(GetSuperClass.java:9)
    at GetSuperClass.get(GetSuperClass.java:23)
    at GetSuperClass.main(GetSuperClass.java:33)
    Question: what's wrong with it?
    Thanks for your response.

    No need to lokup the super class! You already have it!
    import java.util.*;
    import java.lang.reflect.Field;
    // A simple class for getting specify class name's super class family.
    // Usage: java GetSuperClass java.util.ArrayList.
    public class GetSuperClass
        public static void get(String str)
            Class ref = null;
            for (ClassLoader cl = GetSuperClass.class.getClassLoader(); cl != null; cl = cl.getParent())
                try
                    // get Class Objcet.
                    ref = Class.forName(str, false, System.class.getClassLoader());
                catch(ClassNotFoundException e)
                    //e.printStackTrace(System.err);
            get(ref);
        private static void get(Class ref)
            System.out.println(ref);
            System.out.println("field:");
            // get fields
            Field[] field = ref.getDeclaredFields();
            for(int i = 0; i < field.length; i++)
                System.out.println(field);
    //get super class
    Class superClass= ref.getSuperclass();
    //recursive call get()
    if(superClass != null)
    get(superClass);
    return;
    public static void main(String[] args)
    // call static method to start.
    get("java.util.ArrayList");

  • Sub class will allocate seperate memory for super class  instance variable?

    class A
    int i, j;
    void showij()
    System.out.println("i and j: " + i + " " + j);
    class B extends A
    int k;
    void showij()
    System.out.println("i and j: " + i + " " + j);
    what is size of class B will it be just 4 byte for k or 12 bytes for i, j and k ?
    will be a seperate copy of i and j in B or address is same ?
    thank u

    amit.khosla wrote:
    just to add on...if you create seprate objects of A and B, so the addresses will be different. We cant inherit objects, we inherit classes. It means if you have an object of A and another object of B, they are totally different objects in terms of state they are into. They can share same value, but its not compulsary that they will share same values of i &j.
    Extending A means to making a new class which already have properties & behaviour of A.
    Hope this help.That is very unclear.
    If you create two objects, there will be two "addresses", and two sets of member variables.
    If you create one object, there will be one "address", and one complete set of non-static member variables that is the union of all non-static member variables declared in the class and all its ancestor classes.

Maybe you are looking for

  • BAPI_ACC_INVOICE_RECEIPT_POST Error

    Hello All, I am using BAPI_ACC_INVOICE_RECEIPT_POST and receiving this error: "FI/CO interface: Line item entered several times" Does anybody have any idea how to fix this error? Here is my code: REPORT zacm_test NO STANDARD PAGE HEADING             

  • Medium write error

    Get error message "medium write error" when trying to burn a playlist from itunes to a CD and the CD is ejected. This has occurred at settings of max speed and also at 16x and 4x, however at 4x speed it did burn 11 of the 19 songs I wanted to burn; t

  • Permanently deleting videos on ios 8.2

    Just did a big clean-up but but I still see 161 videos in Settings/General/Information/Videos. There is no "Recently deleted" folder anymore so where are they? How can I delete them?

  • Is EBP a component of SRM?

    Dear experts: I read some documents and I think that EBP (Enterprise Buyer Professional ) is a component of SRM. Would you please help confirm ? Thanks!

  • Error compiling OCCI example -  undefined reference

    Hello. I am having trouble linking a simple Oracle OCCI example using SunStudio 12 , Update 1 on RHEL 5.2 . This is the error. ~/demo]$ cat new.C #include<occi.h> using namespace oracle::occi; int main(){ Environment *envr; envr=Environment::createEn