

Java 9 jshell features in which we can create class, methods for minor checking and testing of code without create any Java files and here are solution for modification or add method of class once class has been created using jshell.
- Open cmd and Type jshell
- Create Class Demo in jshell
public class Demo{ public void method1(){ System.out.println("This is first method."); } }
Jshell Demo
- Now Type : /edit Demo
– It will open below java editor:Demo Edit
- Do your updates and click on Accept. It will replace existing class.
References:
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.