Sobes.tech

Can you name the types of documents used for auto-documentation in projects?

Junior — Middle
187

What core functionality does the Maven tool provide for managing Java projects?

Junior — Middle
186

Where does Spring Boot look for components if there is no @ComponentScan?

Senior
186

What will this code output? public class StreamApi { @Data @AllArgsConstructor public static class Client { private String name; private String city; } public static Map<String, Long> countBy(Stream<Client> clients, Function<Client, String> clientParameterGetter) { return clients.collect(Collectors.groupingBy(clientParameterGetter, TreeMap::new, Collectors.counting())); } public static void main(String[] args) { List<Client> clients = List.of( new Client("Ivanov", "Moscow"), new Client("Mikhailov", "Saint Petersburg"), new Client("Sergeev", "Saint Petersburg"), new Client("Ivanov", null), new Client("Sergeev", null) ); long count = clients.stream() .peek(client -> { if (client.getCity() == null) { client.setCity("Moscow"); } }) .count(); Predicate<Client> clientPredicate = client -> client.getCity() != null; Stream<Client> validClients = clients.stream().filter(clientPredicate); System.out.println(count); System.out.println(countBy(validClients, Client::getName)); System.out.println(countBy(validClients, Client::getCity)); } }

Senior
185

Can you explain how the WeakHashMap class works in Java and how it differs from a regular HashMap?

Junior — Middle
185

What data and variables are usually located in the stack during program execution?

Junior — Middle
185

What are the advantages and disadvantages of using a linked list to store elements?

Junior — Middle
185

What is the difference between using a simple Statement and a prepared PreparedStatement for executing SQL queries in JDBC?

184

If we use POST, but HTTP (not HTTPS) — what then?

Senior
184

How is the HashMap data structure implemented and how does it ensure quick access to elements?

Junior — Middle
183

Why does ArrayList work faster than LinkedList during sequential iteration?

Junior — Middle
183

How to determine the first unique element in a sequence of numbers?

Junior — Middle
182

Explain the concept of transitive dependency in the context of dependencies in software systems.

Junior — Middle
182

Explain the working principle of the pipeline method in Stream and its features.

Junior — Middle
182

What is the downside of implementing Singleton through manual code and why is it considered bad practice?

Junior — Middle
182

How can you set up actions to be performed when deleting a bean in a container?

Junior — Middle
182

Have you used the try-with-resources construct in Java for automatic resource management?

Junior — Middle
181

Tell us about the internal memory device in Java and how garbage collectors work.

Senior
181

How to handle exceptions in reactive code?

Senior
180

What is the purpose of using annotations in programming?

Junior — Middle
179
/17