The default behaviour is false:
By default, ApplicationContext implementations eagerly create and configure all singleton beans as part of the initialization process. Generally, this pre-instantiation is desirable, because errors in the configuration or surrounding environment are discovered immediately, as opposed to hours or even days later. When this behavior is not desirable, you can prevent pre-instantiation of a singleton bean by marking the bean definition as lazy-initialized. A lazy-initialized bean tells the IoC container to create a bean instance when it is first requested, rather than at startup.
import java.lang.*;
import java.io.Reader;
import java.util.Scanner;
public class karlic20 {
public static void main(String[]args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Введите данные уравнения");
System.out.println("ax^2+bx+c");
{
System.out.println("Введите a");
int a=sc.nextInt();
System.out.println("Введите b");
int b=sc.nextInt();
System.out.println("Введите c");
int c=sc.nextInt();
{
System.out.println("Вы ввели"+ a +"x^2+"+ b +"x+"+c);
int d,b1;
double d1,x1,x2,x11,x22;
b1=b*b;
d=b1-4*a*c;
d1=Math.sqrt(d);
x11=-b+d1;
x1=x11/2*a;
x22=-b-d1;
x2=x22/2*a;
System.out.println("x1 равен:"+x1+"x2 равен:"+x2);
}
}
}
}
if (switch1.isChecked()) {
editText.setVisibility(View.VISIBLE);
} else {
editText.setVisibility(View.GONE);
//или editText.setVisibility(View.INVISIBLE);
}