
Что произойдёт, когда запустим код?
psvm(String[] args) {
char[] ch = null;
String s = null;
Object ob = null;
sout(ch);
sout(s);
sout(ob);
}
Size: a a a
psvm(String[] args) {
char[] ch = null;
String s = null;
Object ob = null;
sout(ch);
sout(s);
sout(ob);
}
public class Main {
psvm(String[] args) {
sout("Hello world");
}
}
public interface Counter {
int get();
void inc();
}
synchronized void getS() {}
void getS() {
synchronized (this) {
}
}
@Autowired
private BeanA beanA;
@Autowired
private beanB beanB;
private BeanA beanA;
private BeanB beanB;
@Autowired
public DI(BeanA beanA, BeanB beanB) {
this.beanA = beanA;
this.beanB = beanB;
}
@Autowired
FooFooBarBarRepository fooFooBarBarRepository;
@Autowired
FooFooBarBarRepository repository;
public ResponseEntity<Void> foo(@RequestParam(value = "barType") String barType,
@RequestParam(value = "barUID") String barUID)
public ResponseEntity<Void> foo(@RequestParam String barType, @RequestParam String barUID)
if (!foos.isEmpty() {
for(Foo foo: foos) {
bar.delete(foo);
}
}
for(Foo foo: foos) {
bar.delete(foo);
}
public void foobar(List<Bar> bars) {
if (bars.isEmpty()) {
Bar bar = new Bar();
bar.setA();
bar.setB();
bar.setC();
bar.setD();
repository.save(bar);
}
}
public void foobar(List<Bar> bars) {
if (!bars.isEmpty()) {
return;
}
Bar bar = new Bar();
bar.setA();
bar.setB();
bar.setC();
bar.setD();
repository.save(bar);
}