Use of an abstract keyword

Hi all , I want to know about
1.the usage of an abstract keyword.
2.Difference between abstract and interface
3.When to use abstract keyword.

Hi all , I want to know about Give it a try yourself first, post it here and you get feedback.

Similar Messages

  • The abstract keyword HELP

    Hi guys, i am having some difficulty in understanding the abstract keyword. When do we use abstract,its purpose and its funtionality?
    Thanks
    roub

    abstract :-
    1:- you can't creat object of abstract class.
    2:- abstract class is supplying the method's signature without giving any definition for it, like void MyMethod(int a);
    3:-abstract class may contain implementation for some methods.
    4:- any class contain an abstract method must defined as abstract.
    5:- when you define abstract method in the heirachery of class you must declare the method as public.
    6:-abstract can have public or default access only.
    7:- you can use reference to abstract class.
    that's all what i can remember now,

  • Warning  on use of the 'subtable' keyword

    I have previously given advice on this list about the use of the "subtable" keyword which could lead to kern pairs being unavailable. If you have used this keyword, please review the following.
    Background.
    Class pairs in a kern feature are compiled as a lookup with a single subtable. The representation of the class pairs for a subtable looks like a big Excel spreadsheet, with all the left side pairs as the titles of the rows, and all the right-side pairs as the titles of the columns, and the kern pair values in the fields. As a result, every left side pair you name is kerned against every right side pair you name. Obviously, most of the fields are 0; there are non-zero values only where you specified a class pair kern value. Less obviously, all glyphs not named in a right side class are automatically assigned to right side class 0. This means that every left side class in the subtable is kerned against every glyph in the font ( with most of the kern values being 0).
    If you have a lot of left and right side class pairs, this subtable can get so large some of the offset values in the compiled lookup exceed the limit of 64K, and the lookup can't be built. The 'subtable' keyword is provided to help with this problem. It forces the class pair lookup to start a new subtable at the point where you put the 'subtable' keyword. If you have any degree of order in your class kern pair definitions, each of the subtables will then have fewer left and right classes, and the overall size of the lookup is smaller.
    My advice on using this keyword is:
    a) use it only if you have to because of a size oveflow problem, and
    b) there is not much use in trying to be smart about where you put it; it is usually simplest to put the first keyword more or less in the middle of the list of the class kern pairs. If this does not shrink the kern lookup enough, then put another 'subtable' keyword in the middle of each half of the class kern pair list, and so on.
    However, I omitted an important warning:
    c) any left side class can be used only within a single subtable.
    This is because each left side class in a subtable is by definition kerned against every right side class, and hence every glyph in the font because of class 0. It follows that a program looking for a kern pair will never look past the first subtable with a left side class containing the left side glyph. Moral: any left side class can be used only within a single subtable. If you put kern class pairs with that left side class in a subsequent subtable ( e.g; after a subtable break), those kern class pairs will never be seen by any program.
    My thanks to Karsten Luecke, whose struggle with an exanple of this problem showed that my previous advice on this list was incomplete.

    You say you're extending JTable but I see no hint of that.
    public class SpecialisedJTable extends JTable
        public SpecialisedJTable(TableModel model)
            super(model);
        public SpecialisedJTable()
            super();
    }

  • Is there any Specific rule for using "IS" and "AS" keyword?

    Hi,
    i am confused about the use of these two keywords "IS" and "AS".It seems to me they are used randomly anywhere in procedure,package or triggers etc..
    Is there any rule for there usages , or only way is to remember the actual syntax whenever they are used ?

    They are generally interchangeable, so you can use whichever you choose.
    In the English language we say that "some object IS" and "do an action AS" so, for example...
    in a package if we define a type it reads better as:
    TYPE mytype IS TABLE OF NUMBER;because we are saying that this type called mytype IS a table of numbers.
    but if we were to create the type on the database we would use e.g.
    CREATE OR REPLACE TYPE mytype AS RECORD (x number, y number);because we are saying that we are creating (action) a type called mytype AS a record.
    Just a slight difference in grammatical meaning, but Oracle isn't bothered if you choose to use the other one in most cases.

  • How to use chain and endchain keywords?

    Hi i have got a requirement where i have to use chain and endchain keywords can anyone help me with the sample code how to use this keywords?

    Hi,
       Within a chain block, you must use ON CHAIN-INPUT addition. The module is then called if the conteents of at least one screen field within CHAIN block have changed from their intial value.
    Also, there is ON CHAIN-REQUEST addition, this module is called if user changes changes contents of atleast one screen field within CHAIN block..
    ON CHAIN-INPUT--
        PROCESS AFTER INPUT.
            CHAIN.
                FIELD : <Field name 1>,
                             <Field name 2>.
                 MODULE <module> ON CHAIN-INPUT
             ENDCHAIN.
    ON CHAIN-REQUEST--
         PROCESS AFTER INPUT.
            CHAIN.
                FIELD : <Field name 1>,
                             <Field name 2>.
                 MODULE <module> ON CHAIN-REQUEST
             ENDCHAIN.
    I hope u find this helpful..
    write brief about ur requirement??
    Regards,
    Vikram

  • Use of interface, abstract

    Hi all
    A simple question, I have been read some books or web sites about the use of interface, abstracts, but I still don't quite get it such as when should we use it, how should we apply it in terms of programming design..
    Can someone teach me or show me some example....
    Thanks!

    user978043 wrote:
    A simple question, I have been read some books or web sites about the use of interface, abstracts, but I still don't quite get it such as when should we use itAlmost always, especially in non-trivial cases.
    how should we apply it in terms of programming design..Jverd's already given you a good example, but just to reinforce it for you: an interface describes the WHAT; a class defines the HOW.
    An abstract class is somewhere between the two, and is often used for 'skeleton implementations' (you may want to Google it), which allow you to build your own concrete (non-abstract) classes very easily.
    Can someone teach me or show me some example.... This one is filched from "Effective Java" and converts an array of any reference type into a fixed-length List:public static final <T> List<T> asList(final T[] array) {
       return new AbstractList<T>() {
          public T get(int index) {
             return array[index];
          public T set(int index, T value) {
             T oldValue = get(index);
             array[index] = value;
             return oldValue;
          public int size() {
             return array.length;
    }In fact it's highly likely that Arrays.asList() does something very similar to the above.
    Given all the neat things that a List can do, it's a pretty powerful bit of code, and only possible because of the existence of AbstractList.
    HIH
    Winston

  • "use of abstract keyword"

    It is permissible that we can use abstract methods with public,protected access specifiers.
    But when i tried to do so in inheritance i was getting an error that :
    "cannot reduce the visibility of inherited method of Super1(parent class)"
    Check the below given example
    // program
    abstract class Super1
         int a,b;
         abstract void show();//this is working.
         /* The below mentioned are not working*/
         //protected abstract void show();
         //protected abstract void show();
    class Sub extends Super1
         void show()
              System.out.println("Abstract method implemented");
    class Test
         public static void main(String args[])
              Sub object1=new Sub();
              object1.show();
    Plz help me out in knowing why even after access permissions are given it is showing an error.

    "cannot reduce the visibility of inherited method of
    Super1(parent class)"If a parent class has a public method, that method must be public in all child classes. Here's why: Parent pp = new Child();
    pp.someMethod(); Because pp is declared as type Parent, it must honor Parent's contract--it must provide all public methods that Parent does. If Child makes one of those methods protected, package-private, or private, it's violating the contract.
    Because a Child can be use wherever a Parent is expected, Child must provide everything that Parent provides.

  • Adapters-shoud i still use "implements or extends" keyword

    hi all...especially Mr. Glen McCluskey...
    i've just read the TechTips using Adapters-9 May 2000...
    there was an example about using adapters...there wasn't keyword "extends or implements" in that example ...
    so the question is:
    if i use adapters, should i still extend or implements my derived class from base class? or this formula is just enough, for example:
    frame.addWindowListener(new WindowAdapter(){................});
    the example available at: developer.java.sun.com/developer/TechTips/index.html the date is 9 May 2000 writer:Glen McCluskey ...
    thank you, all...

    I don't understand why you say "there wasn't keyword "extends or implements" in that example ", I read the article and see:abstract class A_ADAPTER implements A {
            public void f1() {}
            public void f2() {}
            public void f3() {}
            public void f4() {}
            public void f5() {}
        } which clearly implements interface A, and the class that uses this adapter must extend the adapter. So yes, your adapter must implement the interface it is adapting, and the class that is using this adapter must extend the adapter to "use" it.
    Lee

  • Using CMOD to change Keyword Text

    I'm using CMOD to change a field name for a data element.  After I make the changes and select save, I seem to be in an infinite loop of select the appropirate transport request and then hitting save again.... if I back out by choosing cancle after I have already saved, my chnages are lost.
    I think that there should be some king of sctivate step but I don't see the activate icon on the screen or in any of the menu paths.
    Can someone give me some direction?
    Grateful for your help,
    Malissa

    I figured it out. 
    I needed to activate the CMOD project.
    So for others looking for how to's on chaning keyword text.
    1st create a CMOD project then do the goto text enhancements keywords enter the data element that you want  change then save and then activate your project.

  • Using SCAN ABAP-SOURCE keyword

    Hi,
    My requirement is to get a report program name from the user, drill down the report to see how many Includes and subroutines are there in the report and in which level.
    I was able to drill down the report for finding the Includes with their level using this key word SCAN ABAP-SOURCE.
    Can someone provide me with a code to find the number of subroutines along with the subroutine name and which level they are present.
    Thanks in advance.
    Harini

    Hi,
    I have already drilled down the report to find out thenumber of includes and their levels.
    By using CALL FUNCTION 'GET_GLOBAL_SYMBOLS'
    it accepts to search only for a character in the program.
    I require it to search for the keyword 'PERFORM' and also find in which level it is defined.
    Please let me know how to achieve this.

  • Search using synonym of a keyword

    Lightroom 3.6 and 4: Is it possible to search by synonym of a keyword? It was possible in LR2 (if I remember it correctly) and after LR3 the feature has been gone and looks like it's still not possible. I have huge controlled vocabulary keyword database with synonyms and translations for stock usage and can’t search using synonims. And this is so frustrating!

    Actually I don't even tried to search for synonyms in smart collections. And if my smart collection search for a keyword I frequently know main keyword for photos I want to appear.
    I need a search for synonyms possibility in Filter Keywords input line. When I assign keywords I'am not always remember main keyword, sometimes it's latin or russian or english synonym.
    But I agree the Keyword List filter should reveal synonyms.
    If there will be just a main keyword for typed synonym it will be sufficient (it worked this way in LR2).

  • Using Preview to enter keywords in a PDF shows quotation marks

    When I enter keywords in a PDF with Preview and later open the same file with Acrobat and look at the properties, the string of keywords are within quotation marks. If I enter the keywords while in Acrobat there are no quotation marks. If the keywords are in quotation marks in the properties, does this mean that keywords are one long string that will not search well? I'm confused.

    Preview is a viewer, rather than an editor. It has basic functions for adding annotations and links, and that's about it.

  • Can Premier Pro make use of caption and keyword metadata from Lightroom

    I’m using Premier CS6 to create a slideshow with images from Lightroom. When I export from Lightroom, I have quite a bit of Metadata encoded into the image and I’m wondering if there is a way to see that metadata in Premier?
    I’m probably dreaming but I’d love to be able to create a lower third, title template that would get its information from the Caption field in Lightroom.
    Any other tips for using Lightroom and Premier together would be appreciated.

    Whatever metadata is viewable in PP will be available in the metadata pane.  However, titles cannot automatically 'grab' their data from any source.  It has to be typed or copied in manually.

  • Using more than one keyword don't not work to filter pictures.

    hi,
    i am new to aperture and currently try to filter images with keywords. i have for instance a picture of a dog in my china projects. the keywords attached to the dog picture are: "Animals, Dogs, China, Xian. all keywords capitalized and separated by a comma. if i type Dogs or animals, or any of the keyword attached to it individually its works. i will get the picture. but if i enter two keywords, i.e., Animals, Dogs, I don't get any return. nothing.
    of course, i can open the keyword field, and check Animals and Dogs and it will bring the pictures. But does someone know why typing several keywords (same capitalization, spelling, etc) attached to a picture does not bring result in finding the picture.
    thanks for your help

    There should be a button to the left of the search box which will open a window of search options. One of the options is Keywords and it allows you to check the keywords you would like to search for. You can have it include images which have all the selected keywords or any of the selected keywords. Here is an image of that box:
    http://www.ianlaruephotography.com/picture2.png
    Hope that helps!

  • Using Stringvariables with switch-Keyword ?

    Hallo !
    I am a JAVA newcomer from Austria.
    I know the Keyword switch and case,
    but it is not possible to compare Stringvariables.
    Is there an other command to do this or
    how do you compare Stringvariables with the case-Statement ?
    Thank you for your answer.
    Wolfgang KLD

    Hmmm....
    From Java Lang Spec 2 14.10:
      SwitchLabel:
         case ConstantExpression :
      The type of the expression must be char, byte, short or int...
    .From Java Lang Spec 2 15.28:
      A compile-time constant expression...following:
         Simple names that refer to final variables whose
         initializers are constant expressions.
    .And this doesn't compile (with jikes nor jdk 1.3)
        static final int h1 = "value1".hashCode(); 
        static void test() throws Exception
         String s = "value1";
         switch(s.hashCode())
           case h1: System.out.println("value1 it is");
           default:
              System.out.println("no such luck");
         It must be the phrase 'whose initializers are constant expressions' that does it in.

Maybe you are looking for

  • I recive a message to close firefox when I try to open it, but I don't see any open window???

    Sometimes I try to open a web page and receive a message that Firefox is already running and that I should close it before going to the new web page, I can not see any sign of an open window and am unable to do so. I have to restart my laptop. Sugges

  • How to use two harddrives on one Macbook Pro to store Itunes music

    I have 2 harddrives in my macbook pro and have more music than can be on one drive.   I Know that I can get Itunes to point to either drive but not to both at the same time. Does anyone know how to accomplish using both drives "seamlessly" with one c

  • FTP Sender - Message not reaching XI

    Hi, I am using FTP sender adapter to send an XML file to XI. The file is being picked up by XI properly from the Source directory on the FTP server which is running on my local machine but it is not reaching the integration server. SXMB_MONI shows no

  • Purchase Order Printer Determination

    We would like to printout POs using criterias as Plant and St.Location.The reason is that we have to printout PO in different branches of the Company.There is an option to have printer determination using criterias on header level, but on item level

  • Central instance number

    hi all, at the time of doing installation we are giving the number for central instance. My doubt is that we can give any number (upto 100) or is there any restriction in the numbers for giving central instance number. answers will be apprecited rega