Some more basic quries

Hi All,
Thanx for the great responses from you all last time. I am back with some more doubts, please solve them:
1. Why there can be only one public class per source file?
2. Why the name of the public class must match the name of the source file/compilation unit?
3. Why private/protected access modifiers not applicable to classes? Is there any means by which we can apply these modifiers to a class.
4. The result of 5.0%0 is NaN : What does "NaN" means/signifies?
5. The non-access modifier "static" not applicable to classes? Or Y cant we have static classes?
6. Please follow the below hierarchy:
public class Parent
public void parentmethod()
System.out.println(�parentmethod�);
public class Child extends Parent
public void childemethod()
System.out.println(�childmethod�);
public static void main(String args[])
Parent obj = new Child();
obj.parentmethod(); // prints parentmethod
If I add the below statement and then compile it gives the compilation error
obj.childmethod();
Why the compiler throws an error when the above 'obj' [parent] reference is used to access the Child specific methods, even though the Child object has them? but if I access the parent class methods it executes perfectly.
Thanks & Regards
-Sandeep

For your last question, Java compiler only knows that obj has only one method, .parentmethod(). If you need to call .childmethod(), obj must be cast to Child type and then access to .childmethod()
(Child)obj.childmethod();

Similar Messages

  • Some more basic questions

    Hi Experts,
    Q1. What is a transport request and their types?
    Q2. What is a released transport and a modified transport?
    Q3. What is a workbench transport and a customizing transport?
    Q4. If we say, we are transporting from one server to another, what exactly is happening underline technically?
    thanks in advance,
    Sangeeta.

    hi,
    <b>Transport</b>
    A transport means the process of moving something from one place to another. In R/3 system this ‘something’ means change request. To transport the objects you need to create the change request. It can be done with the help of workbench organizer. Transport System and workbench organizer are closely linked to each other.
    An object original is a development object that has been created in the system in which you are working.
    Suppose you transport object Zsus001 to another system, Zsus001 is object original for system DD1. If anyone tries to modify the program, he will be making repair to it, provided he has access key for the same. R/3 system offers this security measure to ensure that development object remain consistent for all system, thus preventing parallel work on the same objects. Correction of objects and development of objects can be only in original system.
    The difference between Repair and Correction is as follows:
    •     If you modify an object in a system in which it is created, you are making Correction to it.
    •     If you modify an object in a system in which it was not created, then you are making Repair task.
    Releasing Tasks and Request
    When new development or correction is complete, developer must release their task and request.
    To release a task:
    •     Find a task from the Workbench initial screen.
    •     Position the cursor over the task.
    •     Click on the release button
    A request is released by either system Administrator or Project Managers, once all the tasks are released
    Regards
    Ashok P

  • I don't have IMAQ vision, where can I get some super basic easy VI's for IMAQ?

    Hello,
    I don't have IMAQ vision, where can I get some super basic easy VI's to get images from my IMAQ PCI-1424 board, without Vision?? is there some kind of tutorial that will help me get started from the ground up in designing VI's? Also I am trying to run the HL Snap in picture control.vi and I keep getting an error that says:
    -1074397150 occured at IMAQ snap.vi
    Possible reasons,
    NI-IMAQ (Hex 0xBFF6022) wait timed out; aquisition not complete.
    Why am I getting this??? it is driving me nuts, I don't know how to get a image on my computer from the IMAQ board. I can get one in MAX. Also in MAX I try to change the camera driver to Kodak because that is the boar
    d that I have KLI-2113, but when I try to change anything under properties like the window size and then apply it, it says error removing old camera. why does that do that? Some of the other drivers sort of work and let me change the settings. I don't know if they work right though. I can get atleast some response to light from the CCD chip.
    Anyways, thanks,
    Brian

    Brian;
    There is an example on how to display images in LabVIEW without having the full IMAQ application.
    You can always convert the images to bitmaps (flattening) and display them in a picture indicator. If you are going to do some image processing within LabVIEW, this may be the way to go.
    About the error you are getting, hopefully the above example will help you in resolving the issue. If the problem persist, it will be more beneficial if you can post the code. Also, you may get better answers if you post your question in the Vision forum.
    Regards;
    Enrique
    www.vartortech.com

  • To add some more fields in Who is Who

    Hi to all
    My requirement is to add some more fields in Who is Who section in ESS portal.
    Presently we are using the infoset : /SAPQUERY/HR_XX_PA_ESS
    Also tell me how to add more fields in infoset.
    I am basically an ABAPER and have no idea about ESS portal .
    Please advice as this is the requirement i received.
    Thanks & Regards...
    Anubhav

    Hi ,
    Please reffer following link very usefull.
    For : ESS Personal Information UI enhancement without modification
    https://wiki.sdn.sap.com/wiki/display/profile/ESS%20Personal%20Information%20UI%20enhancement%20without%20modification
    http://www.sdn.sap.com/irj/sdn/nw-wdjava;jsessionid=(J2EE3417700)ID1021003050DB11782024544105302604End?rid=/webcontent/uuid/503f22f6-b978-2a10-bf97-ddc21267e752

  • Asha 503: couldn't find some of basic call mgmt op...

    Hi,
    Good evening to all. I am very new member. I have just bought a new Asha 503 5 days ago but since then I couldn't find some of basic call management options into it. These are as follows:
    >Autometic answer (WH 108 dosen't hav any SW to ans a call  so this is most important)
    >Voice dial
    >HD audio
    >VoIP call
    >Conference call
    I have searched Settings->Dual Sim->Sim setting & Settings->Apps->Calls but all are in vain.
    Plz be kind enough to bear with my ignorance & plz let me help to find out those options (as you can see these are very essential options for day in & out).

    Until now not get a answer to my quries. Plz don't think I am annoyed about that. No not at all. Not getting even a hint from anybody actually increased my doubt that it may be two ways.
    1> May be they have no hint as well as me or
    2>Handset hasn't those options.
    So I contacted Nokia Support via live chat & I have chat with one of their CS person & he confirmed that handset dosen't have those option in this moment. But Nokia always telling their customers that Asha 503 have those features. Plz goto
    http://www.nokia.com/in-en/phones/phone/asha503-dual-sim/specifications/   & scroll down to 'Call Management'
    Besides that at this price point it is not expected that these basic features will be available at any handset at every corner of this world?
     What do you think guys am I expecting too much?
    Ridiculously all my prev Nokia handset(6080, N73, 1110 & 5030) had atleast Autometic answer option & 6080 & N73 had voice call also. But alas in 2014 Asha 503 dosen't have those option.
    This is the first time my life I feel cheated by company like Nokia!! They simply can't deliver what they promised their customer.
    What do you think guys what I need to do now? Plz reply

  • I am fairly new to MAC products and I just purchased a new iMac, which I love. I am doing well with it but am looking for some more detailed guidance and tips and tricks. Can anyone recommend any literature etc...

    I am fairly new to MAC products and just purchased a new iMac, which I love! Can anyone recommend some more detailed literature or site for learning my way around the nuances of my iMac? copy and paste, building folders, storing data, bookmarking etc...

    These are the Mac Essentials. The most Basic function tools of the Mac
    http://support.apple.com/kb/HT2477
    These are Mac 101 Articles. These are a bunch of articles that have the information on any app that is on your computer.
    http://support.apple.com/kb/index?page=search&src=support_site.kbase.search&loca le=en_US&q=101
    This is an article that will help you get used to your new Mac since you're Moving from a PC to Mac
    http://www.apple.com/support/switch101/

  • How about some more samsung products in the auctions ? I really don't want to bid on those crappy ipads. How about a better mix of product lines or at least some of your "new" digital coupons geared towards Samsung products????

    How about some more Samsung products in the auctions ? I really don't want to bid on those crappy ipads.
    How about a better mix of product lines or at least some of your "new" digital coupons geared towards Samsung products????

    How about some more Samsung products in the auctions ? I really don't want to bid on those crappy ipads.
    How about a better mix of product lines or at least some of your "new" digital coupons geared towards Samsung products????

  • Hello. I have an ipod classic generation 4 and I want to add some more music to it however my computer and itunes do not recognice it when I try to connect it. Is it incompatible with windows 7 or itunes?

    Hello. I have an ipod classic generation 4 and I want to add some more music to it however my computer and itunes do not recognise the device when I try to connect it. Is it incompatible with windows 7 or current version of itunes?

    It should still be compatible.  Have you tried plugging it into a different USB port using a different cable to see if that helps?  Perhaps, try it another computer as well to see if it's recognized there.
    Otherwise, start by checking to see if it's even recognized in Device Manager.  See this article for details.
    http://support.apple.com/kb/ts1496
    B-rock

  • HT203167 I bought a new computer and am trying to get my library to the new one and purchase some more music.  I downloaded itunes but can't get any further.  thanks

    I bought a new computer and am trying to get my library from the old computer to the new one and download some more songs.  I have downloaded itunes to my new computer but can't get any further.  sorry, I am a computer dinosaur.  Thanks for your help.

    You need to contact Apple, either through the link in that article or by phoning them and asking for the Account Security team.
    (85855)

  • Adding  some more  line  items  in  the  unconfirmed  Transfer Order

    Hi  All,
         We do kitting activity at our warehouse i.e. several components make up an assembly of a particular final product. The WH creates a production order(BOM) based on which the system creates TO wherever stock of individual components are available for picking. However, the remaining components which are required to make up the product are still awaited in such a case (stock unavailable at present). Under this situation, is it possible that the balance remaining components can be added to the same original TO created earlier (i.e. where only available line items of that TO is confirmed and the TO header is still open).
    Alternatively, can we add  some more  line  items  in  the  same unconfirmed  Transfer Order to facilitate this kitting process and thereby confirming the TO header finally.
    A quick feedback will be appreciated. Thanks.
    Regards
    Jaman

    Hi,
    If you know what all the items you will include in one TO, even though you haven't pick the items;
    In the TO, you have an option to make the items "Inactive" for which picking hasn't been done.
    After making the items "Inactive", if you save the TO, it will allow you to confirm the TO, but then, it will create the new TO with the inactive items.
    Hope its clear.
    Aktar

  • I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it show

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

  • How to add some more field in dispaly?

    Dear friend,
    I have a abap query ib co module,now i created a abap report by convert the query.As it's conatin logic based on field group and sysmbols.it's difficult to find out where i have top add or not? i have to add some more coloums in display report and also add some more tables from where i can get more details which i have to used further dispaly and update the same in z table.
    please help me............

    Hi,
          Whether u r creating a new report or modifying a report..
    Becoz if u r using ALV means we can add in the field catalog..If u r using the classical interactive reports means we need to find where the values r inserted and where it is displayed and then only we want to proceed..
    Let me know the answer to give a good answer

  • Help me in getting some more powerful authentication....

    I am looking for your help regarding the validation of users in JAVA,mysql , i am looking for some code help .regarding this matter.i have a code which uses cookie to authenticate the users but can you help me in getting some more powerful authentication....

    I'm not sure what you mean by "IP Community list", but here are 3 reference sites for Regular Expressions:
    Regular Expression Tutorial - Learn How to Use Regular Expressions
    http://www.regular-expressions.info/tutorial.html
    Regular Expressions Cheat Sheet by DaveChild
    http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/
    Regular Expressions Quick Reference
    http://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm

  • Hello, I have installed Reader, Adobe Acrobat, trial versions of Photoshop and Illustrator. Some more than once. They work for a few days at most then I am told to re-install. I cant look at any pdf file even though I can still see reader in my programs.

    Hello, I have installed Reader, Adobe Acrobat, trial versions of Photoshop and Illustrator. Some more than once. They work for a few days at most then I am told to re-install. I cant look at any pdf file even though I can still see reader in my programs. What is going on and what can I do to fix this?

    Unfortunately no, It says "Adobe not responding" as well when I try to open a pdf. It has done this a few times where I had to uninstall and reinstall. Also, Illustrator tells me to uninstall/reinstall as well.

  • HT201774 How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages i

    How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages in bulk,

    You can't.
    All photos transferred from your computer are stored in the Photo Library. The photos in the album or albums below are not duplicates - they include a pointer to the original photos stored in the Photo Library. This way you can view the photos in a particular album only by selecting the album, or you can view all photos available in all albums by selecting Photo Library.
    Just as with an iTunes playlist. A song cannot be in an iTunes playlist unless the song is in the main iTunes library. Placing a song in a playlist does not duplicate the song. Remove the main iTunes library or the songs from the main iTunes library that are in a playlist and the songs will no longer be in the playlist either. This way you can listen to the songs in the playlist only by selecting the playlist, or all songs in your entire iTunes library by selecting Music under Library in the iTunes source list.
    The same with iPhoto on a Mac. A photo cannot be in an in iPhoto Event or Album unless the photo is in the main iPhoto library. Placing a photo in an Event or Album does not duplicate the photo. This way you can view the photos in an iPhoto Event or Album only by selecting the Event or Album, or all photos in all Events or Albums.

Maybe you are looking for

  • Web Service Runtime error

    Hello everyone In our newly built AP0 ( dev, qa & prod ) systems there are many errors of web service and now the systems are being used by Users. Error --> 000 SAPSYS WS 4 Error in techincal configuration Error during the retrieval of the  logon dat

  • Helper class invoking by servlet cannot find file.

              Hi,           I have the following file structure in the war for my web application.           WEB-INF/classes/com/olf/servlets/AppServlet.class           WEB-INF/classes/com/olf/util/CommonUtil.class           WEB-INF/classes/com/olf/util/

  • I have iPad model ME147LL/A today for the first I went to shot a video but I was unable to select "video"; what can I do to fix this?

    I went to shot a video today fort he first time, but the video button would not select so I couldn't shoot a video all other buttons worked, I could take photo etc., but could not do a video; anything?

  • Icons not staying organized

    I haven't seen this problem for a long time on my Mac (since like 10.2). I am running the latest of 10.4. I have my finder icons at 48/ keep arranged by name / all folders. When I restart they are all over the place and smaller. Only happens to my bo

  • Selective run in process flow

    Hi all, Can i run the process flow selectively? For example i have 10 activities in a process flow. I want to run only 3 of them when the process flow execute. is it possible to do? if possible then how can i do this? plzz help. Thanks & Regards, Sum