reset branch on local git
git fetch origin
git reset --hard origin/master
reset branch on local git
git fetch origin
git reset --hard origin/master
git reset branch
git fetch origin
git reset --hard origin/branch_name
java clear console
// in JDK 11 you can do:
// It can be better than exec("cls") because it even works in intellij.
// Also, putting println() in a for loop is worse because there is a
// noticable delay between calls. This code does a single call, but
// stacks a ton of '\n's.
private void clearConsole() {
System.out.println(System.lineSeparator().repeat(100));
}
java clear console
public static void clearScreen() {
System.out.print("\033[H\033[2J");
System.out.flush();
}
java clear console
Runtime.getRuntime().exec("cls");
What's the method to clear the console in java
// in JDK 11 you can do:
// It can be better than exec("cls") because it even works in intellij.
// Also, putting println() in a for loop is worse because there is a
// noticable delay between calls. This code does a single call, but
// stacks a ton of '\n's.
private void clearConsole() {
System.out.println(System.lineSeparator().repeat(100));
}
// OR
public static void clearScreen() {
System.out.print("\033[H\033[2J");
System.out.flush();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us