Can I use  a method in super()

Hi,
I hope to use a method in super(). Can I?
like this
public Example(Class1 obj1, Class2 obj2){
super("This is an example"+getString());
public String getString(){
return string;

It can be compiled successfully. Then you have a serious compiler bug. Report it to the vendor and start using another compiler.
But this method
getString() cannot be revoked. I have no idea what you mean by that?
So I hope to know if
there are some ways to use methods in super()?If your compiler was working, it'd tell you that instance methods can not be invoked here.
Class (static) methods however, are fine.

Similar Messages

  • Can i use Response method in livecycle designer to render or open pdf doc?

    Hello,
    Can anybody please tell me is it possible to use response method available in the adobe livecycle designer which takes the input value to open the pdf doc.
    Case 1: if we send adobe form throgh mail as pdf doc,then at the receiver side if the user open the pdf doc a popup should come asking for the input value.This popup will be from the response method.
    Case 2:if we save the adobe form as pdf doc on to our desktop and then if we try to open the pdf doc a popup should come asking for input value.
    Is it possible to do ?
    If yes then in which event of livecycle designer we should write that response method and in what way?
    If no,is there any other way to do this?
    Thanks in advance,
    Menaka

    Yes i have tried in other events of livecycle designer.
    In Formready event -> if i do preview pdf,first it will display form and then it ll ask for password.But with this event only if i save the pdf to my local desktop and try to open it ll not ask for password anywhere.
    In Layoutready event ->Pdf preview in designer is working fine,but when i save it my local desktop and try to open it ll not ask for passward.
    Could anybody tell me how to do it.
    Menaka.

  • Can I use object methods in a class

    I have a class ball and I am in the process of creating it's move method. I want this method to make the ball move depending on certain factors.
    One of these factors being where a bar has been stopped. I have a bar class which extends JProgressBar and when stopped, produces a number. I want this number to be available to my ball class in some way so it can use it to determine how far the ball has to move. The number can be output using its method getValue() but I am unsure how this can be used by another class.
    I doubt this is possible, but I am sure there are ways to achieve what I want. Any help on this subject would be great.

    Methods in one class can call methods defined in another class, subject to access restrictions (public, protected, package-private). This is pretty basic, so you should be able to get the meat of it from your text or tutorial. Look there, or in the following for explanations and examples, and post again if you can't get your code to work.
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/learning/new2java/index.html
    http://javaalmanac.com
    http://www.jguru.com
    http://www.javaranch.com
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • Can we use a method in addActionListener ??

    Hello Everyone,
    can anyone tell me how to use a method in addActionListener ?
    if u have any example , plz send me
    Thanks & Regards

    [url http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html]How to Write an Action Listener
    You can invoke your method when you provide implementation for the actionPerformed(...) method.

  • Can we use call method or call action in dynpro.

    hi all,
    In the view of a web-dynpro, can we call one action inside another action..?
    or can we call a method inside an action..
    if so plz help...
    thanks in advance,
    jithin.

    Hi Jithin,
    Suggest you that, you keep your logic in a method which you are using for create(event).
    the same method you can call in modifyview so that after you create again the modifyview will get trigger and then it fills your dropdown.
    or
    after create functionality is done then call a method to fill the dropdown.
    try to modularize your code using methods then you can
    re-use it.
    still you need any clarificatinos let me know.
    Regards,
    Mahesh

  • How can i use C# method to SAP IDoc

    Dear Friends
    i have to do one scenario in which i have to connect to database let us say SQL Server but i can't touch Database directly i can call a C# method(3rd party application is in .NET) and using XI i have to send it to SAP iDOC.
    can any one help me in this how to proceed
    Thanks in Advance.
    Ishika

    <i>Do you have any document for that on how to do it with webservices.</i>
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    See this
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2131 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Regards,
    Prateek

  • Can i use mini cd in super drive

    Can I use , play mini cd in the super drive ?

    You should not use mini CDs in slot-loading CD/DVD drives which of course includes the super-drive fitted to MacBook Pro laptops, the super-drive fitted to older iMacs, the super-drive fitted to older Mac mini computers and the external USB super-drive.
    The super-drive fitted to older Mac Pro computers is a tray loading drive and it would be safe to use a mini CD in it.
    Note: For the same reasons you should not use CDs or DVDs with paper stick-on labels in slot-loading drives.

  • Can i use 2 methods to deploy icon files in Oracle IDS?

    Dear all,
    I'm using Oracle 9IDS(Forms) and i'm trying to use 2 methods to deploy icon file:
    -In development phase, i use defaul.icon.path and defaul.icon.extension in registry.dat file and imagebase=documentbase. My icon are well deploy when i run application from form builder.
    -In deployment phase, on the same plateform, i use jar file following these steps:
    1- I store jar file in same directory with all runtime files(fmx, mmx, etc.)
    2- i create a virtual path(/forms90/Tel/) to map with this directory
    3- in formsweb.cfg, i put the following line:
    [myapp]
    imagebase=codebase
    archive_jini=f90all_jinit.jar,/forms90/Tel/images.jar
    When i call my application directly (http://localhost:8889/forms90/f90servlet?config=myapp),
    icons don't appear.
    I would like to know, what's wrong?It's possible to use theses both methods for deploy icons on the same plateform?
    Thank u for your help

    Hi Franck,
    I thank that red correctly the document(how deploy icon on web).But that isn't the matter.I update my formsweb.cfg as you advise me
    [myapp]
    archive_jini=...,/forms90/images.jar
    imagebase=codebase
    Icon don't appear at runtine while other gif files(splashscreen,logo) appear.Notice these others gif files are compressed in the same jar file. Notice also, that when i use default.icon.path parameter in registry.dat file, icons are well deployed.
    It's incomprehensible.
    Thanks you for your help!

  • Can I use an external usb super drive on my iMac 10.6.8 ?

    Can I use an external USB SuperDrive on my 10.6.8 iMac the internal drive is not working at all? Thank you.

    DrGerega wrote:
    Can I use an external USB SuperDrive on my 10.6.8 iMac the internal drive is not working at all? Thank you.
    The answer is no unless you are willing to modify a system file.  See this article.  Read the entire thing and the comments before deciding if it is the route for you.
    If it were me I'd go with Shootist's advice and get another brand--for the reasons he stated.
    I have a SuperDrive that I use with my 2012 MBA but with my late-2012 27" iMac, which does not have an internal CD/DVD drive and therefore will work with the SuperDrive, I use a 3rd party that is both faster and cheaper than the SuperDrive.

  • Can we use equals method in JSTL

    hia all,
    is there is possible to use equals method in JSTL c:when tag. if so please give me an example or else please tell me some solution.
    regards
    subramanian

    Have you tried it anyway? Where exactly are you talking about with "contents"?
    Remember that the == operator in JSTL isn't the same as the == operator in Java. In JSTL it invokes the Object#equals() method behind the scenes, while in Java it checks the equality of the reference.

  • How can I use instance methods created with HashMap

    class Template
    static HashMap customer;
    a few methods created various customer
    public static display() //to display a particular customer information among i've created above
                 String objectName,currentObjectName;
              Customer customer;
              Scanner scan=new Scanner(System.in);
              System.out.print("Please enter the customer name");
              objectName=scan.nextLine();
              Iterator iteratorForCustomer=CustomerMap.entrySet().iterator();
              Map.Entry customerEntry=(Map.Entry)iteratorForCustomer.next();
             while(iteratorForCustomer.hasNext())
                    customerEntry=(Map.Entry)iteratorForCustomer.next();
                    if(objectName.equals((String)customerEntry.getValue()))
              System.out.println("Name : " +customer.getName()); //I'm trying to reference to an instance method getName() here but i can't do that .
    }The problem is I've created as many as I want and later in the program I tried to redisplay a particular customer information based on the input (objectName). User type in the objectName and I tried to look for a particular customer Object in the HashMap and display only the relevant customer information. Is there any way to do it ? Thanks everyone in advance.

    Peter__Lawrey wrote:
    use the get method
    [http://www.google.co.uk/search?q=map+tutorial+java]
    [http://java.sun.com/docs/books/tutorial/collections/interfaces/map.html]
    And then either look at a generics tutorial, or, if you're stuck on a pre-1.5 version of Java, find out about casting

  • Can't use inherited method with JButton

    I am trying to use the getActionListeners() method on a JButton. The method is inherited from the AbstractButton class. However, when I try to compile with this line...
    ActionListener CurrentListeners[] = OKButton.getActionListeners();I get the following error:
    Method getActionListeners() not found in class javax.swing.JButton.
    I am also using the removeActionListener() method, which is inherited from the same object, and the compiler has no problem with that!

    Okay, then does anyone know how I can change the
    ActionListener for a JButton? I want to use the
    removeActionListener(ActionListener l) method and then
    addActionListener(...). However, since I can't get
    the current ActionListener, I have nothing to pass
    into the remove method.It's my belief that's this is why this method was added to AbstractButton in JDK 1.4. It makes life so much easier. Why don't you download the JDK 1.4 and install it into your IDE?
    Otherwise, you should subclass JButton as someone else suggested and provide an accessor method for the listener.

  • How can I use staitc method?thanks!

    here is my code :
    class a
    void go()
    System.out.println("now you are calling a.go method!");
    public class b extends a
    public static void main(String args[])
    a t1=new a();
    t1.go();
    It can be compiled and excuted perfectly,but I read from book that "in static method ,we can olny call static variable or method....." ,but t1.go() method is not static method ,why? thanks!

    static methods cannot refer to the methods and variables in their scope. They can however instantiate an object and use it... just like you did in your code.
    Think about this.
    public class SuperString extends String{
      public static void test(){
        String hello = "Hello";
        System.out.println(hello + " The string length is: " + hello.length());
    }in this example whe have String class that we added a static function to. It is otherwise the same thing as a String. Notice how I can instantiate and use a String class, but If I tried something like this
    public class SuperString extends String{
      public static void test(){
        System.out.println(this + " The string length is: " + this.length());
    }it would fail.

  • Can subclass use a method in supercalss as the implementation of interface?

    Assume P is the superclass of S. S implements interface I. Both P and I have the same method m. Must I implement m in S?
    Thanks.

    It depends.
    If m is public then it is already inherited so you don't have to unless you want a overriding implementation.
    If m is private, it is not, so you have to.
    If it is protected, the Super Class method cannot hide the public method in the interface, so again, you have to.
    HTH.
    -o12

  • How to use POST method to send & recieve XML data in WebDynpro application

    Hi There,
    How can we use POST method in a Url (callign weebdynpro application) and pass XML String content. How can we read this this inside WD Application.
    Any pointers will be great help.
    Rgds

    Closed

Maybe you are looking for

  • Unwanted Blank line appearing in the output

    Hi all, we are trying to print the line items of a Order. There is no issue in first page. But in second page, after prinitng the first record...a blank line is coming followed by the second record. Now, we need to remove this blank line. There is a

  • I want to delete all contacts

    Just received a used unlocked Blackbrry pearl 8100 as gift. For now I only want to use it as  phine and camera with contacts and calendar apps. I have replaced the sim cardwith the card from my carrier and the phone is functioning. The previous owner

  • E Mail blasting?

    it does not seem that the mail software version 4.4 that came with my i Mac can handle sending out over 500 emails at once. or what some would call an e mail blast. anyone else ever had this problem, or some info

  • Very slow 64 bit Lightroom Windows 7?

    I've recently switched over to Windows 7 64 bit Home Premium, running 8GB DDR3 RAM, 1GB ATI Radeon 4800 series video card, 1920px monitor and have found the performance in Lightroom 3.4.1 much slower than I did on Windows XP, 32 bit running 2GB of RA

  • Any way to mass locate files?

    Ok, I've reimported my library, but iTunes looked in My Music/iTunes instead of My Music where all the files were. Now all the songs and their data (play count, ratings, etc) are in the library, but can't play because I need to relocate the files. No