Suppose I have this code in Java in NetBeans
public class Clazz {
public void method1() {
method3();
}
public void method2() {
}
}
So, I press Alt + Enter to prompt "create method", which creates my method at the end of the class.
public class Clazz {
public void method1() {
method3();
}
public void method2() {
}
private void method3() {
throw new UnsupportedOperationException( "Not supported yet." );
}
}
So my question is how to create a method only under the current method? Similar:
public class Clazz {
public void method1() {
method3();
}
private void method3() {
throw new UnsupportedOperationException( "Not supported yet." );
}
public void method2() {
}
}
Thank you for your time:)
source
share