Click here to Skip to main content
15,868,016 members
Home / Discussions / Java
   

Java

 
GeneralRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
RedDk3-Mar-22 16:54
RedDk3-Mar-22 16:54 
GeneralRe: JAVA_REGEX_WHITESPACE _CHARACTER Pin
Richard Deeming3-Mar-22 21:25
mveRichard Deeming3-Mar-22 21:25 
GeneralDynamic Polymorphism Pin
Sudhanshu_India24-Feb-22 2:38
Sudhanshu_India24-Feb-22 2:38 
QuestionRe: Dynamic Polymorphism Pin
Richard MacCutchan24-Feb-22 3:27
mveRichard MacCutchan24-Feb-22 3:27 
AnswerRe: Dynamic Polymorphism Pin
Sudhanshu_India24-Feb-22 4:26
Sudhanshu_India24-Feb-22 4:26 
GeneralRe: Dynamic Polymorphism Pin
Richard MacCutchan24-Feb-22 4:56
mveRichard MacCutchan24-Feb-22 4:56 
GeneralRe: Dynamic Polymorphism Pin
Sudhanshu_India25-Feb-22 0:42
Sudhanshu_India25-Feb-22 0:42 
GeneralRe: Dynamic Polymorphism Pin
Richard MacCutchan25-Feb-22 0:51
mveRichard MacCutchan25-Feb-22 0:51 
In the following lines you have calls to getAddress() ...
Java
System.out.println("Customer Address : " +this.getAddress());

System.out.println("New Customer Address :"+ " "+this.getAddress() );

... But that call returns the Customer.Address object which contains various properties. So when you pass that to the println method the system tries to print it. But since it has no idea how to print an Address object it just prints the class name and its memory address. You need to add a toString method to your Address class that returns the address formatted as a string.
GeneralRe: Dynamic Polymorphism Pin
Sudhanshu_India25-Feb-22 1:09
Sudhanshu_India25-Feb-22 1:09 
GeneralRe: Dynamic Polymorphism Pin
Richard MacCutchan25-Feb-22 1:17
mveRichard MacCutchan25-Feb-22 1:17 
GeneralRe: Dynamic Polymorphism Pin
Sudhanshu_India25-Feb-22 1:20
Sudhanshu_India25-Feb-22 1:20 
GeneralRe: Dynamic Polymorphism Pin
englebart11-Mar-22 11:56
professionalenglebart11-Mar-22 11:56 
QuestionJava programming Pin
Member 1554066219-Feb-22 0:02
Member 1554066219-Feb-22 0:02 
AnswerRe: Java programming Pin
OriginalGriff19-Feb-22 0:03
mveOriginalGriff19-Feb-22 0:03 
GeneralRe: Java programming Pin
MarkTJohnson22-Feb-22 7:23
professionalMarkTJohnson22-Feb-22 7:23 
GeneralRe: Java programming Pin
ramisthand764-Mar-22 23:26
ramisthand764-Mar-22 23:26 
GeneralRe: Java programming Pin
OriginalGriff5-Mar-22 0:24
mveOriginalGriff5-Mar-22 0:24 
QuestionJSP -> JavaBean Connectivity Issue Pin
Josh Hebert6-Feb-22 12:40
Josh Hebert6-Feb-22 12:40 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
Josh Hebert6-Feb-22 12:42
Josh Hebert6-Feb-22 12:42 
QuestionRe: JSP -> JavaBean Connectivity Issue Pin
Richard MacCutchan7-Feb-22 0:44
mveRichard MacCutchan7-Feb-22 0:44 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
englebart12-Feb-22 14:29
professionalenglebart12-Feb-22 14:29 
AnswerRe: JSP -> JavaBean Connectivity Issue Pin
jschell17-Feb-22 11:26
jschell17-Feb-22 11:26 
QuestionSwitch from VB.Net to Java Pin
Kanel Roath4-Feb-22 4:16
Kanel Roath4-Feb-22 4:16 
AnswerRe: Switch from VB.Net to Java Pin
Richard MacCutchan4-Feb-22 5:00
mveRichard MacCutchan4-Feb-22 5:00 
GeneralRe: Switch from VB.Net to Java Pin
Kanel Roath5-Feb-22 2:44
Kanel Roath5-Feb-22 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.