Check out example codes for "java clear console". It will help you in understanding the concepts better.

Code Example 1

Runtime.getRuntime().exec("cls");

Learn ReactJs, React Native from akashmittal.com