Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Return in Java??

Former Member
0 Likes
419

Hello!

I have a problem: I have in my method()

String t = results[2];

String d = results[0];

with return t + d;

And I want to import it to other method1(). How can I do that??

Thanks!!

2 REPLIES 2
Read only

Former Member
0 Likes
402

Hi,

Here's a few suggestions:-

Use Google to search for Java help

Use the search here at SDN if Google doesn't help

If you really need to ask the question, try to post it to the correct area, like Java programming for instance.

Gareth.

p.s. If I undersand your question correctly, you want to return a string from method() to method1()? If so try something like:-

public String methodOne(ArrayList results){
String t = results[2];
String d = results[0];
return t + d;
}

public void methodTwo(){
String otherString = methodOne(resultsList);
}

Or something like that - I've just made it up as I haven't written Java for a while

Read only

JanStallkamp
Advisor
Advisor
0 Likes
402

Hello Andrei.

As your posting's subjects shows you have a Java question. This forum is only focusing on ABAP development. I would like to ask you to ask your question in the Java forum but I've seen that you already asked there, too. Therefore I would like to mention that we ask everyone not to double post questions in several forums.

I will close this thread. Please focus on the best suiting forum.

Best regards,

Jan Stallkamp