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");
}
}
Was this page helpful?