Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a class with static method and use java API with imports using jshell
jshell> public class Sample {
...> public static void join() {
...> StringBuilder sb = new StringBuilder();
...> sb.append("Smart").append(" ").append("Techie");
...> System.out.println("The string is " + sb.toString());
...> }
...> }
| created class Sample
jshell> Sample.join();
The string is Smart Techie
jshell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.