Why Constructor has not return type ?

Please tell me why constructor has not return type ?

Constructor is a method which basically called for creating instances of an object. 
It should return an instance of the class whose constructor we are calling.
So basically the return type is implicit.
If the syntax allows to specify return type, users may put some other return types other than the containing class type, which is not relevant.
Muthukrishnan Ramasamy
net4.rmkrishnan.net
Use only what you need, Reduce global warming

Similar Messages

  • Why constructor do not have return type

    Why constructor do not have return type

    enter_name wrote:
    Because it only returns one thing: A reference to itsself.This is not quite true. It's the new operator that constructs the object and returns the reference. When new invokes a constructor the object is already partially constructed.
    Well, constructors may actually return something but if they do it's a secret between them and new. Constructors cannot be called by the programmer like methods. They don't even belong to the class. They're only used during object construction and then by new.

  • Why data has not been copied from staging DB to Reporting DB even timer job status is success ?

    Hello,
    I am facing following issue regarding web analytic service for specific date 2014-08-18:
    Verified following services which are running and status was success on that specific date 2014-08-18 :
    Web Analytics Service
    Microsoft Usage Data Import
    Microsoft SharePoint Foundation Usage Data Processing
    Observed latest Web Analytics Setting as below :
    LastAggregationDateId 
    20140817 -   The date id of the last successfully completed data aggregation
    LastAggregationTime
    2014-08-18T00:00:13.210 - The time of the last successfully completed data aggregation
    LastBestBetSuggestionAggregationDateId
    20140818 - The date id of the last successfully completed best bet suggestion data aggregation. This date id should not be reset to an earlier date manually.
    LastDataCopyTime
    2014-08-17T23:59:09.693 - The last time the data were copied from the staging databases to this reporting database for aggregation
    Above settings says that Data has not copied from Staging DB to Reporting DB on Date 2014-08-18
    In order to verify the same I have checked as follow:
    SELECT COUNT (*) FROM [dbo].[WATrafficAggregationByDate] WITH (NOLOCK)
    WHERE  [DateId] = 20140818
    Above SQL Query has returned ZERO value.
    Can anyone please let me know Why data has not been copied from staging DB to Reporting DB even timer job status is success ?
    Your help will be much appreciated.
    Thanks and Regards,
    Dipti Chhatrapati

    The image itself has the answer
    The user requests a page, and the action gets picked up by the Web Analytics service that runs on SharePoint.
    The Web Analytics service logs this in the “.usage” files.
    A Timer job called “Microsoft SharePoint Foundation Usage Data Import” by default runs every 30 minutes. It imports the logs into the staging database.
    Each night the “Microsoft SharePoint Foundation Usage Data Processing” Timer job runs and transforms the data into the reporting database.
    The last run time of the import from staging and the aggregation is logged in the Settings table in the Reporting database.
    Usage and Health Data Collection Service Application collects Data about Usage and Health of your farm.
    This information is used for Health Monitoring and this is also required for running the Web Analytics Service. If you do not have a Usage and Health Data Collection Service Application or your
    Usage and Health Data Collection Proxy is stopped, you will not see any data in the Web Analytics Report
    Regards Chen V [MCTS SharePoint 2010]

  • I wonder why that has not been deducted the amount from my bank account

    I wonder why that has not been deducted the amount from my bank account

    Hello Iria,
    Most unusual.  I think you will need to wait a few days in case it is a bank problem.
    If this situation continues you should contact Apple, after all, you don't want to be thought of as taking advantage, I'm sure.  That's why you raised it in the first place.
    Do keep us updated.
    Thank you for the star.

  • Is there a way to end a method that has no return type?

    Without using an exception, as they are costly I am told, and without using may if then statements, is it possible to end a method if some criteria isn't met.
    example.
    public void doThis(){
      // the method relies on the state of some
      // other things.
      if(!someBoolean) endHere
      // then following is the rest of the method.
      // I'd like to be able to do this so that the "meat"
      // of the method is located under the conditions
      // that must be met.
    }... Any thoughts?
    Thank You

    No need to hide or commit ritual suicide, the "void" keyword could lead you to think that your method can't use the return statement. At least you wrote code to investigate and didn't spend 10 or 20 posts asking for verification. Be aware, some folk will tell you that there should be only one exit point from the method, often this is true. In large methods you can get lost in the execution path if there are multiple exit points. I think it's a judgement call.
    As for returning a bogus boolean, but, from a design point of view, if your method really doesn't have anything to return to its caller then the signature should reflect that with a return type of void (I know you are suggesting returning the bogus boolean for a different reason, and you've abandoned the idea anyway, I'm just being pedantic here)(indulge me). Returning a bogus boolean makes the class method more difficult to understand from a design and JavaDoc point of view because I, as the user of your method, will see it returing a boolean and expect to be able to use that value, and it might color my view of what the method does.
    Lee

  • Why can I not return to home page after exitting web mail?

    My home page is Virgin Media. I can log in and out of my isp's Google powered web mail but am not automatically returned to my home page and cannot access it by the 'back' button. I have to close and re-open the browser and there is often a delay before the browser re-opens.

    That's an expected behavior.  You cannot access home-shared music unless the person who shares actually has iTunes up and running.  My suggestion is all the users to make iTunes to automatically launch when the computers start.  If using Windows I believe there isn't a way for iTunes to launch and sort of hides.  If using Mac OS, iTunes can launch and hide by checking the box on System Preferences > Users & Groups > [User] > Login Items.  Hope this helps.

  • Why apple has not fixed or atleast responded to users on LION Overheating issue???

    I am having a MacBook Pro 13 bought last year.
    I was happy with my snowleopard but, my friend sugested to upgrade to LION, paid all money and upgraded to LION,
    Within a week overheating started, and it was difficult to keep it on my lap.
    I have tried all the tricks mentioned in apple communities and other websites to solve this heat ,, sorry OVERHEATING issue .. but no benefit....
    My MacBook Pro 13 had been thouroughly checked in apple serivce centre and no hardware issue had been found for the heat issue... so its LION only...
    Also to mention that i use very less number of applications opened at a time, like firefox, chrome and itunes. So the heating is not due to usage of heavy applications .
    After searching the whole interenet and apple community forum, i am surprised to see that there is no response from anyone in apple.. dont they periodically check what apple users are facing.. ?? dont they monitor the apple community so that they can fix the issues before it gets out of hand.....
    I think Apple doesnt care on whats happening in Apple community portal, so we all are on our on... 
    I had a very good impression abt apple. until before upgrading to Lion... crap my MONEY IS GONEEE.
    For anyone who got solution for this issue, other than the trick to delete Citrix plugin, disable spotlight etc, I am ready to welcome any new WORKING solution for this OVERHEATING...

    @@ds store i am thinking the same now...
    @@Eric. i did trying that 2 weeks back itself.. no improvement
    @@OGELTHORPE i already have the iStat Pro. this we can monitor the heat. thats it.. this wont solve the issue.
    hmmm dont know.. if i dont get a solution by today i am gonna go back to snow leopard...
    Why to burn my aptop hardware due to the stupid LION's overheating....

  • Why does .equalsIgnoreCase() not return true when they're equal

    http://pastebin.com/m741df92b
    else if (message.matches("quit")) {
                   System.out.println("inside quit thingie");
                   // sender = sender.trim();
                   for (int i = 0; i < admins.size(); i++) {
                        String admin = admins.get(i);
                        System.out.println("testing :" + admin + ": vs :" + sender
                                  + ":");
                        if (sender.equalsIgnoreCase(admin)) {
                             System.out.println("quitting because of "
                                       + message.substring("quit".length() + 1));
                             super.quitServer(message.substring("quit".length() + 1));
                        } // end if
                   } // end for
    Output:  (the first bit is logging the incoming message)
    #TDWTFMafia:<btk> quit
    inside quit thingie
    testing :btk: vs :btk:Since posting the pastebin, I changed the code a bit so it would spit out the length along with what it's testing. that gave me
    testing :btk: (3) vs :btk: (3)

    Can you make sure the problem is not in
    System.out.println("quitting because of "+ message.substring("quit".length() + 1));
    super.quitServer(message.substring("quit".length() + 1));by replacing these 2 line with something like
    System.out.println("quitting);
    super.quitServer("quit");
    {code}
    Is the code you pasted surrounded by a try/catch statement? If message equals "quit" or something shorter your substring will throw a IndexOutOfBoundsException.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Why constructor not return any(value) type?

    hello,
    why constructor does not have a return type
    thanks

    because i want to know why they made like that?The question is: why should it not be that way? A constructor is not a method. Why should it behave like one?
    The constructor's point is to set the freshly created object to a defined state. Nothing else.
    Even if it had a return value: what would you do with it?
    class X {
      int X() {
        return 17;
      public static void main(String[] args) {
        X instance = new X();
    }So tell me how you would store the returned 17. Another assignment in the same statement? Not possible.

  • "Primitive Type Returned", when I try to configure the data return type.

    I am basically following this tutorial, Getting started with ColdFusion and Flash Builder 4 beta, but instead of using the database provided, I am using SQL Server 2008.  I am now stuck on the part titled, "Configuring the data return type".  In step 5 of this section, I submit my credentials and then I get a popup titled:
    Primitive Type Returned
    The operation returned a response of the type "Object".
    You may either update server code to fix the returned data or Click OK to set "Object" as the return type of this operation.
    I am not sure if "server code" would be my database and/or the Coldfusion code that was provided in this tutorial.  I am thinking that its the former, however I am new to both technologies.  Would anyone know why FlashBuilder will not strong type this data for me?

    Hi,
    Thanks for your feedback!
    The server code here means the ColdFusion code provided in the tutorial.
    The "Configure return type" step is performed to change the return type of the function.
    If you notice after importing the CFC in the Flash Builder the return type of getAllData was Object but with this step you are trying to change it to a Strong Type.
    So context click on the getAllData function,select 'Configure return type', enter "EmployeeSalesData" click NEXT , enter valid RDS credentials in the security dialog and click FINISH.
    This should have ideally set your return type to "EmployeeSalesData"(Strong type).
    Also if you are extremely new to this i suggest you to pick up a pre-release build of Flash Builder which has a COOL feature which can help you get started pretty fast and simplify most of these workflows.
    To avail for the pre-release build please send a mail to [email protected]
    Hope this helps!
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • IWEB previous does not return to previous page

    I am trying to get back to the last page with the Previous option in the Link setup. I do not know why it does not return to the previous page but some other pages.

    The following script is courtesy of Cyclosaurus.  Use it in an HTML snippet:
    <button type='button' target='_parent' onclick='javascript:history.back();' > Previous Page </button>
    OT

  • Apple Care will not return my Hard drive.

    I have a Power Book G4 1.67 . The hard drive has failed, it is covered under applecare for another 6 months, I have case number, the person on the phone was very nice, they sent the shipping box.
    I think it's more then just the HD, however. The drive was partitioned in 3 sectors. Of course the system sector was the one that failed. I can boot in Target Disk Mode and see the other 2 sectors of the drive. The system sector is the one that is bad, I can't get that info off there. I am sure someone else can who is better qualified can. I really need that info, I can see they system partition in Disk Warrior, but am not a guru in that or the couple of other products I bought to see if I could rescue this info.
    I asked AC Rep if I could have the Hard Drive back, they said no, I asked if they would back up the information, they said no, I said I would pay for either back up or pay for the old hard drive myself, (again) they said no.
    So now I am stuck, if I replace that HD myself, I may void the warranty, I know it's a customer installable part. I have replaced many over my apple years, upgrading HDs about every 2 years in multiple computers and putting the old ones in external cases. I have also upgraded RAM, airport cards, pram batteries so I am comfortable working the simple upgrades. So I could simply replace that Hard Drive and then send it in, but then they may blame me for the problem.
    There also smaller problems, screen latch won't stay closed, superdrive will not eject correctly, screen has some lines in it occasionally. It's not a road warrior, but I use it a lot and always treat these well. The drive was making no noise at all and no indication of a impeding failure. I treat my machines very carefully, I still have a Pismo that is gasping it's last breath.
    This HD has all my important passwords and other personal info, I was in the middle of backing it up when thing went blitz. I saved the data from the other 2 partitions but I need that HD. Why will they not return my old part ? Or even back it up for a fee. I am afraid to replace the HD with a new one, and then send it off, or even try to reboot it from a new one as I maybe be stuck with it and they say well I did the damage.
    Yes I know multiple back ups, but this is the first HD failure in 20 years and I should have had 2 HDs for back ups instead of one. Any other part I could see their point, but that HD has information I need and I don't want someone having it either. Is there a fair solution here.
    This thing has been down a week, I just got the box and I need to do something. There is no Apple store up here and the company that can do the repairs, messed up a iBook G4, so the only option is sending it out to apple care.
    Ideas and Suggestions?
    Geoff

    Well Holy Smoke !! Apple has agreed to let me get my data back a bit of a round about way but we will see.
    I am going to use a hard drive recovery service so it will go like this.
    A" local service provider," whom did not do anything at all to fix an iBook I gave them, under Apple Care to repair, but keep it 3 weeks and then said, I could not find anything by Goggling the problem...I see the problem that cursor is all over the place and jumps anywhere it wants., a problem came up and by the time we got back the iBook was out of warranty . Sometimes the local help is tough, but I try to support them.
    I think, with me standing there, they can remove the hard drive from my powerbook, it's pretty easy..
    Then, with Apple Care's blessing, I can send the drive into a recovery company, yes expensive, then return the drive in parts if that is the way it comes back, with my powerbook, ship it and AppleCare will fix it the PowerBook.
    That is really good, and if all goes well, I will be very impressed and not hesitate to get that new
    MBP. They even offered to let me take out the drive, but I thought, better to keep it in the "Apple Family."
    Now they did not send a letter or email to this effect, that would have made me feel better, but the attitude at Apple, has really changed, these people went multiple times to supervisors to get this answer and solution. Not the quickest way to get it fixed, but
    I am willing to bend, if they are willing to alter what is a well oiled line and will create a bump in their flow..
    We will see, I told them they just might get a bag of parts and I will not reinstall the bad drive, as it is most definitely shot. No problem, it's all in the notes the CSR said.
    We will see, but for today, this is sure a different attitude then the last go around, a few years ago. The CSR people are nice, understand English, as they seem to be based in Canada, which is a whole lot better then anywhere else I would want to talk too, or have talked to. They can understand abstract ideas, unlike those who just read from a card and stick to what the card says.
    I am holding my breath, but I hope to report that this all goes smooth. I liked it when Apple was a good company. People went out of their way to help you no matter it took to get it fixed or working. I think a company can be good, profitable, plus have a excellent CSR and repair program.
    For today at least, here is to Apple, way to go.
    Geoff

  • WAAS Not returning proper web redirects

    We have one WAAS edge device which is not returning the proper results when entered in a browser. When we reload
    the WAAS device, while it is rebooting, it will return the proper results. We have cleared all of the caches that we know
    of and all of our edge devices are the same and using the same policy.
    It is not handling redirects properly.
    We have one server running Apache, which handles redirects. For Instance Typing in :
    prod   goes to https://prod.domain.com
    test    goes to https://test.domain.com
    train   goes to https://train.domain.com
    When the WAAS is up, typing prod,test,or train will all take you to https://prod.doman.com
    When the WAAS is down or rebooting typing prod,test, or train will take you to the correct URL as specified until
    it comes back up. The other sites are configured identically as can be seen by the WAAS central manager. This WAAS
    device is running version 4.4.1.12
    Has anyone run into this before? W

    This case is now solved, for now. We opened a TAC and there was something wrong with the policy that was applied that was affecting mutiple WAAS devices. We were unable to grab a trace while this issue was in failure.
    In summary, we have an "ALL WAAS" policy which applies to all devices. The TAC technican created a singular policy
    that applied directly to one of the affected WAAS devices and set the policy to TFO only. Just putting this policy in force
    seemed to correct the issue. After this was done, we then reapplied the orginal policy and the issue no longer existed.
    The issue has not returned so far. When the issue was happening, it was easy to reproduce. Setting the HTTP AO policy to "PassThrough" immediately corrected the issue. Setting it back, the issue would return.
    So right now we are working, but do not know the "Why" as to exactly what caused the problem.

  • BufferedReader readLine() not returning null

    I'm trying write an SMTP client using Socket.
    I'm sending EHLO command to the SMTP server is is returning multiline response. When I tried to read this multiline response using the BufferedReader in a while loop, it is never returning null.
    Following is my code snippet
    while(true)
                    data=reader.readLine();
                    multilineData +=data+"\r\n";
                    if(data==null )
                        break;
                    }why it is not returning?

    I have written debug statements.
    It is printing the following lines and it still expecting something from the server even though server has finished sending all the response.
    250-mail.merakdemo.com Hello <hostname>, pleased to meet you.
    250-ENHANCEDSTATUSCODES
    250-SIZE
    250-EXPN
    250-ETRN
    250-ATRN
    250-DSN
    250-CHECKPOINT
    250-8BITMIME
    250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
    250-AUTH=LOGIN
    250-STARTTLS
    250 HELP
    This is the end of response from server.
    And even I tried to break the while loop by checking the "HELP" String in the response. It is breaking the loop, but it is never returning the control.
    Following is the Code snippet:
    private String pullMultilineData(BufferedReader reader) throws CommunicationException
           String multilineData="";
           String data="";
            try
                while(true)
                    data=reader.readLine();
                    multilineData +=data+"\r\n";
                    // as per SMTP Protocol last line is without "-"
                    if(data==null || data.equals("") || data.indexOf("-")==-1)
                                        break;
                   logger.log(Level.DEBUG, "Data: "+data);
            catch(IOException ioe)
                logger.log(Level.ERROR, "I/O exception: "+ioe);
                throw new CommunicationException("unable to pull the respose, i/o error occured");
           return multilineData;
        }

  • My Line has not been installed and I want to cance...

    Hi
    I originally placed my order with BT for a phone line and broadband back in December for it to be activated in January. To cut a long story short I have been told countless different things from BT and from openreach about when my line will be installed and I've got to the point where I don't want to be with BT anymore.
    I want to cancel with BT as it its 2 months later and I still no closer to internet or a phone line, will BT attempt to charge me if i cancel? I can't see how they can seeing as they have not fufilled their promises and have done nothing for my property.
    Thanks
    Reece

    rbeekmeyer wrote:
    So what you're basically saying is that I'm screwed regardless of what I do because of open reach. Do these people answer to no one?
    Certainly looks that way.
    You say you have been told countless different reasons why it has not been done.
    Do you want to tell us the reasons , maybe then someone can suggest something. Possibly a MOD might be able to look into it for you. No point in biting your nose off to make a point.
    toekneem
    http://www.no2nuisancecalls.net
    (EASBF)

Maybe you are looking for

  • Installation problem for Java EE 5 SDK Update 2

    Hi , I have jdk1.5.0_12 (J2SE) installed on my Windows XP. Now i am trying to install J2EE on my machine.I tried to install it twice but it comes to a halt after completing 45% at the same jar file. Following is the link which shows it comes to a hal

  • New chat groups not showing up in client

    i have skype installed on my mac and, apparently, I was added to a few new converstations. I am not seeing any of the messages in my client though. No new group popped up in the left hand bar. Individual conversations are still working and old chat g

  • Connect Mac-mini to Macbook Pro to iPad 2?

    Has ANYONE found a use out of connecting any apple device that isn't an iPhone? I own a new Macbook Pro, iPad 2 and I just bought a mac mini for my flatscreen. I connected all three together via Bluetooth but after they connect and form a path they a

  • SRM 7.0 PO fields edit

    Hi Guru, I am new to SRM but I have this problem. I have created a Shopping card. When I go to Buyer Professionnal, search for PO number, when I displays I want I want a specific text like 'Hello World' to show up in 'Note to Supplier' field. How can

  • Skype to Go in Hawaii

    Dear reader in order to get a Skype to Go Number I added credit to my account. That worked well. The problem occurred when I wanted to actually set up the number. I'm in Hawaii and it seems there is no possibility to set up a number here? It is very