Beginner: Can you call methods like this?
I want to know if you can call a method from inside a method, and then, when the called method is finished, the code starts running again from the point directly after this finished method was called. Example:
public class Name{
public static void main(String args[]){
System.out.print("A");
example();
System.out.print("C"); //I want it to return to this point, after finishing the called method
}
public static void example(){
System.out.print("B");
}
}
5 Replies
⌛
This post has been reserved for your question.
Hey @OtáviobzDuplo! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Please format your code to make it more readable. For java, it should look like this:
yes this is exactly what that code does
When a method call completes, it continues after it
Lmao it was something dumb in my code, forget it
Post Closed
This post has been closed by <@701256802821734413>.