Share the joy
- default can be used in switch statement.
- default can be used in annotation, specifying the default value. For example:
@Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @interface Todo { String author() default "Yash"; } @Todo(author = "Yashwant") public void incompleteMethod1() { //Some business logic is written //But it’s not complete yet }