Skip to content

Instantly share code, notes, and snippets.

@2013techsmarts
Created February 15, 2017 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2013techsmarts/c3c35926b3ff8d56bfa69d62de734484 to your computer and use it in GitHub Desktop.
Save 2013techsmarts/c3c35926b3ff8d56bfa69d62de734484 to your computer and use it in GitHub Desktop.
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