Ganesh Patekar

Bartender
+ Follow
since Jun 24, 2015
Ganesh likes ...
Hibernate jQuery Spring MySQL Database Tomcat Server Java
Pune, Maharashtra, India.
Cows and Likes
Cows
Total received
87
In last 30 days
0
Total given
78
Likes
Total received
248
Received in last 30 days
0
Total given
535
Given in last 30 days
0
Forums and Threads

Recent posts by Ganesh Patekar

Congratulations Jeanne !!  

Blog explains how study guides comparatively reduces the work of certification aspirants.
2 years ago
To be eligible for the drawing please create a separate topic here ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING. Questions in this thread aren't eligible for drawing.
Welcome to CodeRanch all of you

and congratulations for new arrival.
Welcome to CodeRanch and congratulations for new book.
2 years ago

Carey Brown wrote:... If they say two int's then leading zero's don't exist. If they say two Strings representing a number then it may or may not allow leading zeros...

Ahh I see, agreed.  
2 years ago

Ganesh Patekar wrote:... you better use String....

Sorry, StringBuilder would be good than String since String is immutable.
2 years ago

wayne brandon wrote:how could i compare if there is the same number in each, like the 2?

I guess you mean to say, how to compare two numbers to find out same digits present in those two numbers. For example num1 = 1028 and num2 = 2205 Output: 0 2

In that case first you need to separate each digits of num1 to compare with every digits of num2. I think you better use String rather than int type for numbers since number such as 0235 will create problem while separating digits using % and / operators.

See String for charAt(..) and other String methods which might help.
2 years ago
and welcome to CodeRanch !
2 years ago
One of the rules of method overriding is: The access modifier of an overriding method must provide at least as much access as the overridden method ( default method of interface ).

Implicitly the access modifier of default method is public but in MultiInt class overriding method int doStuff() has package-private access modifier which is weaker or lesser accessible than public hence the compilation error.
Please always QuoteYourSources  ( name of the book with author(s) name or website URL ) to avoid copyright infringement.
@ BG that's fine, it happens with everyone  
2 years ago

Brecht Geeraerts wrote:....

I guess you meant i--  rather than i++ at for update.

Why do you think you need to String variables? You don't need two String variables, only one is enough.

I think you don't need to declare String variables as static unless there is a valid reason it be static, either declare it as an instance ( non-static ) variable may be with private modifier? then you can initialize it using constructor or you can declare and initialise String variable as local variable in main method.
2 years ago