Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!

Ganesh Patekar

Bartender
+ Follow
since Jun 24, 2015
Ganesh likes ...
Eclipse IDE Hibernate jQuery MySQL Database Spring Tomcat Server
This soul began to dwell in this body named Ganesh Patekar since 31/07/1987 in Solapur, Maharashtra, India.
Being youngest child in the family had happy childhood but I was also an obstinate kid As days go by I became more amiable.
I had persuaded Bachelors of computer application( BCA, Batch 2007-10 ) from Sinhgad College of Science, Pune. I’m so greedy about learning so couldn’t stop there so persuaded Master of computer application ( MCA ) from Sinhgad Institute of Management, Pune. I used to act as emcee and compare in college events. Those were the best days of life.
I really adore to learn new things. I always eager to write a beautiful code I enjoy visiting natural places near by Pune on weekends.
I’m passionate about maintaining good physic so I do yoga, pranayama and workout regularly because I think, health is wealth.
Pune, Maharashtra, India.
Cows and Likes
Cows
Total received
27
In last 30 days
0
Total given
9
Likes
Total received
161
Received in last 30 days
20
Total given
269
Given in last 30 days
22
Forums and Threads

Recent posts by Ganesh Patekar

I think you better contact their Help and Support...
Welcome to CodeRanch!!    Post the code so far you tried. If has error post the code along with complete error message ( Only text ). Don't forget to use code tags while posting the code. Please go through Use Code Tags and Not A Code Mill
1 day ago

Maxitoxin Mayank wrote:Thanks Ben, though to further clear my understanding, if we replace the statement with it will fail to compile in the current context, isn't it?


I don't think so because both A.B b = a.new B(); and B b = a.new B(); means same. It compiles and runs successfully.
  • Seems you've not gone through the naming convention link posted in previous post. Field's name starts with first letter in lowercase ... hence UserBalance; better be userBalance; etc.
  • It's not mandatory to name parameters similar to the fields, could be something else, although named different better use this keyword while using instance field.
  • As CR already pointed about private and toString ...
  • Avoid writing too long lines else at least break them. Please go through Dont Write Long Lines

  • Probably I misunderstood OP's question and assumed there is only one ATM machine where multiple users make transactions so advised having static int atmBalance; to share current ATM balance among objects.

    @CR
    Agreed It makes no sense to have only one class, better have separate class for ATM as well as for user ...  perhaps need to rectify application design but before that need to know what OP's exact requirements are ...
    1 day ago

    Randy Too wrote:Just wonder is this an e-book ? (Not paper book) ?


    Jeanne Boyarsky wrote:First, a big thanks to Karl Beecher for being here to promote Bad Programming Practices 101 (e-book)

    Yes, It's an ebook.
    3 days ago

    Arpan Ghoshal wrote:Can you tell be how can I add myself to the OCJP wall fame, I opened the page but didn't find any option to add myself.

    It appears you haven't added your name in OCAJP as well.

    There is an Edit option  which lets you edit that Wiki page. Add your detail in that column the way others added. Just copy same way and put your information in appropriate columns. It's ordered by date. Recent one come on the top. We have another separate Wiki page for OCPJP too.
    Congratulations,    those are really good scores.    Thank you for such detailed information. It'll definitely be helpful to others.  Don't forget to add your name to the Ocajp Wall Of Fame and OCPJP Wall Of Fame.
    Topic Icons
  • Table incorporates topic icons with their respective meanings which will help to understand the current status of topic.

  • IconMeaning
    Topic with unread post(s)
    Topic with read post(s)
    Hot topic with unread post(s)
    Hot topic with read post(s)
    Requested topic with unread post(s) to be marked as resolved
    Requested topic with read post(s) to be marked as resolved
    Resolved topic with unread post(s)
    Resolved topic with read post(s)
    Unresolvable topic with unread post(s)
    Unresolvable topic with read post(s)
    Locked topic with unread post(s)
    Locked topic with read post(s)
    !Flagged topic for more attention
    Topic moved to appropriate forum Or merged with other topic by a moderator
    Unread Wiki page
    Read Wiki page
    News topic with unread post(s)
    News topic with read post(s)
    Last reply on the topic

    Note:
  • Topic marked as hot topic when it gets 20 or more replies
  • To flag a topic, enter number of flags and click Add flag(s) button at the bottom of topic page.
  • To request your created topic as resolved, click on Resolved button at the top of topic page. Resolved button will be invisible once you click on it
  • 4 days ago
    Why are you returning null when elements of a and b are same, here on line 43-45

    Suppose you have elements of a and b as follow
    Indexabcounter1counter2
    ---00
    01100
    11010
    25220

    in above scenario your counter1 should be 2 and counter2 should be 0 but in your code when elements of a and b are same instead of doing nothing you are returning null value to the place where this compareTriplets method was invoked from i.e on line 80
    which assigns null value to result variable.
    4 days ago
    Congratulations, that's really a good score   best of luck for the next exam. 
    TreeSet on line 8 being considered as class which you have defined in this Java file but not the imported java.util.TreeSet which you actually want to use. Change the name of class you created to something else.
    4 days ago

    Gary Moffat wrote:I am a professional planner, I have spent over 40 years planning things and watching them get done. I just love work, I have been watching it for many decades.

    That's an interesting as well as inspiring. 40 years of experience that is huge. We too have members over here who have such large experience. Feels good to share thoughts with experienced people.

    Once upon a time I thought I would retire and build a farmstead like the  folks over in "Permies" but I am not ready to retire, I can't afford to. I am writing this because I am somewhat frustrated, to work means to travel: I can hardly plant a garden, build a house or a piece of furniture, not even raise animals.

    Not necessarily It has to be the same think people do over in "Permies", occasionally you can go to child orphanage Or go to near by garden spend some time with people of your age ( Or of any age), make some friends there who aren't of your field so you people will not discuss same think you do when you are on work. Good to meet and have chat with other field's people. That's what I do too when I get frustrated and bored.

    If you could fix something that is wrong with the world, or even address a particular problem, what would it be?

    Honestly I don't believe there something wrong with the world. It's as It was and It will be in future too. I can fix If something I feel is wrong with myself ( of my past ) and I need to change I will try my best to change my self but I can't change others, don't even try to change other Or please anyone. I could be wrong but that's what I think.

    but Hollywood has a sort of interesting one that made money before so they have to remake it 3 or 4 times. This is the 21st century, we do not need them any more.

    Same goes with Bollywood industry always imaginary Love stories. Nothing wrong with them. They make movies on the subject we as public demands. If we stop watching flicks on a particular subject then why would they make Or make sequel of it. They are there to make money ergo will make what is in trending Or demand.

    I would rather say we better change our self ( as a person ) eventually world will change.
    4 days ago
    This is an example how you can use constructor to initialize those fields and override public String toString() method of Object class to return and print a string that "textually represents" this object i.e. an object of Test class.

    Output:
    Test code: 101 Test Name: Primary
    Test code: 102 Test Name: Secondary

    Go through The Java™ Tutorials: Providing Constructors for Your Classes to know more about constructors.
    5 days ago