ru
Feedback
Чашечка Java

Чашечка Java

Открыть в Telegram

Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels

Больше
8 550
Подписчики
-124 часа
-207 дней
-2430 день
Архив постов
Mockito 5 Supports Mocking Constructors, Static Methods and Final Classes Out of the Box Mockito has released version 5, swit
Mockito 5 Supports Mocking Constructors, Static Methods and Final Classes Out of the Box Mockito has released version 5, switching the default mockmaker to mockito-inline in order to better support future versions of the JDK and allows mocking of constructors, static methods and final classes out of the box. The baseline increased from Java 8 to Java 11, as supporting both versions became costly and managing changes in the JDK such as with the SecurityManager proved difficult. By Johan Janssen Read: https://www.infoq.com/news/2023/01/mockito-5/

Java News Roundup: JDK 20 in Rampdown Phase 2, New JEP Drafts, JobRunr 6.0, GraalVM 22.3.1 This week's Java roundup for Janua
Java News Roundup: JDK 20 in Rampdown Phase 2, New JEP Drafts, JobRunr 6.0, GraalVM 22.3.1 This week's Java roundup for January 23rd, 2023, features news from OpenJDK, JDK 20, JDK 21, GraalVM 22.3.1, TornadoVM 0.15, Spring Cloud Azure 5.0, Spring Shell 3.0.0 and 2.1.6, Spring Cloud 2022.0.1, Quarkus 2.16 and 3.0.Alpha3, Micronaut 3.8.3, JobRunr 6.0, MicroStream 8.0-EA2, Hibernate 6.2.CR2, Tomcat 10.1.5, Groovy 4.0.8 and 2.5.21, Camel Quarkus 2.16, JDKMon 17.0.45 and Foojay.io at FOSDEM. By Michael Redlich Read: https://www.infoq.com/news/2023/01/java-news-roundup-jan23-2023/

3 Examples of flatMap() of Stream in Java Hello guys, if you are doing Java development then you must have come across the fl
3 Examples of flatMap() of Stream in Java Hello guys, if you are doing Java development then you must have come across the flatMap() method on Stream and Optional Class. The flatMap() method is extension of map() function as it does both flattening and mapping (or transformation) instead of just transformation done by map() method. I have explained the difference between map() and flatMap() earlier in detail, but just to revise, let's revisit it. If you have a list of String e.g. {"credit", "debit", "master", "visa"} then you can use the map() method to get a list of integer where each value is length of corresponding String e.g. list.stream().map(s -> s.length()) will produce {6, 5, 6, 4}. This is called transformation because you have transformed an stream of String to a Stream of integer. Java Interview questions and tutorials Read: http://www.java67.com/2023/01/3-examples-of-flatmap-of-stream-in-java.html

From Zero to Hero: определите ваш уровень решения LeetCode задач от 1 до 5 В этой статье я хочу написать про мой опыт взаимодействия с платформой LeetCode, и описать свою подготовку к интервью в FAANG подобные компании путем разбиения ее на уровни. А какой у вас уровень? Читать: https://habr.com/ru/post/713498/?utm_campaign=713498

Top 50 Advanced Java Garbage Collection and Performance Interview Questions and Answers Hello Java Developers, If you have go
Top 50 Advanced Java Garbage Collection and Performance Interview Questions and Answers Hello Java Developers, If you have gone through any Java Developer interview, particularly for a senior developer role then you know that a good knowledge of JVM internals and Garbage collection is important. Even though Java and JVM take care of memory management for you, bad code can still cause memory leaks and performance issues. For example, if you are creating millions of objects in a loop or keeping an un-intended reference of dead objects then you are putting additional strain on the Garbage collector and creating a memory leakin your application. You cannot blame Java and JVM for that and the only way to avoid such errors is to know about how Garbage collection works. Java Interview questions and tutorials Read: http://www.java67.com/2020/02/50-garbage-collection-interview-questions-answers-java.html

Top 40 Perl Interview Questions and Answers for Programmers Hello guys, if you have been working as a professional Software d
Top 40 Perl Interview Questions and Answers for Programmers Hello guys, if you have been working as a professional Software developer then you may have heard about Perl, one of the most powerful scripting languages. Perl is really great when it comes to creating reports, write scripts to analyze text, and connect to DB, load data and generate reports. Perl is even more important for IT support professionals, business analysts, and IT professionals who need to work in the field of operations. That's why Perl questions are quite common during Software developer and IT support interview, especially if the Job description mention Perl or you have added Perl as a skill in your resume or LinkedIn Profile. Java Interview questions and tutorials Read: http://www.java67.com/2020/05/perl-interview-questions-and-answers.html

[Solved] How to check if two String are Anagram in Java? Example Hello guys, if you are preparing for Coding interviews then
[Solved] How to check if two String are Anagram in Java? Example Hello guys, if you are preparing for Coding interviews then you already know that String is one of the most popular topics. You will be bound to get some string-based coding problems on interviews. If not, you have come to the right place becuase we'll look at one of the most popular String programming interview questions today, how to check if two given strings are Anagram of each other?Two String is said to be an anagram of each other, if they contain exactly the same characters but in a different order. For example "ARMY" and "MARY" are an anagram of each other because they contain the exact same characters 'A', 'R', 'M' and  'Y'. Java Interview questions and tutorials Read: http://www.java67.com/2019/04/how-to-check-if-two-string-are-anagram.html

How to create a String or int Array in Java? Example Tutorial There are several ways to create an array in Java, for example,
How to create a String or int Array in Java? Example Tutorial There are several ways to create an array in Java, for example, you can declare the array without initializing it, or you can create and initialize the array in the same line. If you want to make an array with values, then you need to first decide which type of array you want to create? e.g., do you want a String array, which can contain String objects like "abc," "def," or do you want to create an int array that contains int values like 10, 20, etc. In Java, you can create an array of any type, including primitives like byte, int, long, and objects like String, Integer, and other user-defined objects. Let's some code to make a new array in Java. Java Interview questions and tutorials Read: http://www.java67.com/2019/10/how-to-make-new-array-in-java.html

10 Examples of an Array in Java Along with the String, the array is the most used data structure in Java. In fact, String is also backed by a character array in Java and other programming languages. It's very important for a Java programmer to have good knowledge of array and how to do common things with array e.g. initialization, searching, sorting, printing array in a meaningful way, comparing array, converting an array to String or ArrayList, and doing some advanced slicing and dicing operation with an array in Java. Like my previous tutorials 10 examples of HashMap in Java,I'll show you some practical examples of an array in Java. If you think, any important operation is not included, you can suggest their examples and I'll add them to this list. Java Interview questions and tutorials Read: http://www.java67.com/2018/02/10-examples-of-array-in-java-tutorial.html

How to find 2nd, 3rd or kth element from end in linked list in Java? Example [Solved] Hello guys, today, I am going to discus
How to find 2nd, 3rd or kth element from end in linked list in Java? Example [Solved] Hello guys, today, I am going to discuss one of the important linked list based coding problems from interviews -how to find the Kth element from the end? This question is also asked as to how do you find the 3rd element from the last of a singly linked list in one passor write a Java program to find the 5th element from the tail of a given linked list in one iteration. In this article, you will learn the programming technique so that you can solve any variant of this problem, I mean the Kth node from the tail problems and some linked list-based challenges. The difficulty in this question is that you need to solve the problem in one iteration or one pass. This means you cannot traverse the linked list again. I mean you cannot go till the end then traverse back to the Kth element. Java Interview questions and tutorials Read: http://www.java67.com/2020/04/how-to-find-kth-node-from-end-in-linked-list-java.html

Difference between array and Hashtable or HashMap in Java A couple of days back someone asked me about the difference between
Difference between array and Hashtable or HashMap in Java A couple of days back someone asked me about the difference between an array and a hashtable, though this is a generic data structure and programming question, I'll answer it from both a general programming perspective as well on Java perspective where Hashtable is not just a data structure but also a class from Java Collection API. Even though both array and hashtable data structure are intended for fast search i.e. constant time search operation also known as O(1) search, the fundamental difference between them is that array require an index while hash table requires a key which could be another object. Java Interview questions and tutorials Read: http://www.java67.com/2021/08/difference-between-array-and-hashtable.html

Top 25 Linked List Interview Questions for Java Programmers Hello guys, if you are preparing for Software Development intervi
Top 25 Linked List Interview Questions for Java Programmers Hello guys, if you are preparing for Software Development interview or want to become a Software Engineer in 2023 then you must pay full attention to two important topics: first is Data Structure and Algorithms, and second is System Design. These two topics are very essential and you will always find questions from these in any coding interview. They are also the most difficult to crack as they are very vast, no matter how much you will prepare there will be certain questions which you don't know but if you have solid knowledge of fundamental data structure like array, linked list, binary tree, hash table, heap, and graphs as well sorting and searching algorithms like quicksort, merge sort, selection sort, insertion sort, binary tree as well advanced String and graph algorithms then you can still do well. Java Interview questions and tutorials Read: http://www.java67.com/2022/11/15-linked-list-interview-questions-for.html

Top Java Blogs Weekly: Best of 5/2023 Best of Top Java Blogs, year 2023, week 5 Read: https://www.topjavablogs.com/news/best-
Top Java Blogs Weekly: Best of 5/2023 Best of Top Java Blogs, year 2023, week 5 Read: https://www.topjavablogs.com/news/best-of-5-2023

How to use Map.compute(), computeIfPresent() and ComputeIfAbsent in Java? HashMap and ConcurrentHashMap Example The JDK 8 has
How to use Map.compute(), computeIfPresent() and ComputeIfAbsent in Java? HashMap and ConcurrentHashMap Example The JDK 8 has added several useful methods in existing interfaces e.g. java.util.Map, java.util.Collection, and java.util.concurrent.ConcurrentMap. Thanks to default methods, the much-needed evolution of existing interfaces becomes possible. Out of many useful methods, one method which stands out to me is the compute() method, which allows you to update a value in ConcurrentHashMap atomically. As per Java documentation, The compute() function tries to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). The entire function is performed atomically. Java Interview questions and tutorials Read: http://www.java67.com/2017/12/java-8-compute-and-computeifpresent.html

What is Blocking Deque in Java? How and When to use BlockingDeque? Example Tutorial Hello friends, we meet again here today o
What is Blocking Deque in Java? How and When to use BlockingDeque? Example Tutorial Hello friends, we meet again here today on our journey to Java. Before we continue forward, let me inform you guys that today's topic is in continuation of our Java Deque topic. If any of you guys have not read the Java Deque tutorial, go ahead and read that one first. Though there is no such limitation of this article, it is recommended to have gone through the basics of Deque and our previous post. So, I guess now we will continue our Deque topic and today we will discuss something very interesting. Today we are gonna jump into the advanced topic of Deque and how we can leverage the functionality Java has provided for a better and more robust application building. Java Interview questions and tutorials Read: http://www.java67.com/2022/02/how-to-use-blocking-deque-in-java.html

How to use LinkedList in Java? Singly LinkedList and Doubly LinkedList Example Tutorial Hello friends, we meet again on our j
How to use LinkedList in Java? Singly LinkedList and Doubly LinkedList Example Tutorial Hello friends, we meet again on our journey to Java. I hope you guys are enjoying Java and are trying hands-on too. Today we are gonna discuss a very easy topic (yeah, I mean it :p). But, do not get carried away just by "easy", this is the hottest topic asked in various interviews, exams, and development purposes too. So, what's the wait? Let's start!  As usual, let's start with a scenario. Let's say you want a data structure that stores data in a sequential manner, like an array. But, you don't know the size yet while initializing the data structure. Arrays don't support that, they need a size beforehand. So, what should we do? Do not worry, as Java is here to help us again. Let's explore it then! Java Interview questions and tutorials Read: http://www.java67.com/2021/10/how-to-use-linked-list-in-java-example.html

How to get First and Last Element of LinkedList in Java [Example] Hello guys, if you are wondering how to get the first and l
How to get First and Last Element of LinkedList in Java [Example] Hello guys, if you are wondering how to get the first and last element from Java LinkedList then you have come to the right place. Earlier, I have shared the best Data structure and algorithms coursesand in today's post, I will teach you how to get the first and last element of a linked list in Java. This is one of the common coding problems but we will see it from different angles. In Java, you don't need to write and create your own LinkedList, there is a built-in class called java.util.LinkedIn and you can use that class whenever you need a linked list data structure. Java Interview questions and tutorials Read: http://www.java67.com/2020/07/how-to-get-first-and-last-element-of-linkedlist-in-java.html

What is HashSet in Java? How and When to use Set Data Structure? Example Tutorial Hello guys, we meet again for our journey o
What is HashSet in Java? How and When to use Set Data Structure? Example Tutorial Hello guys, we meet again for our journey of learning Java. Today, we are gonna learn something very fruitful and easy. Hope you all are excited and ready. I would recommend you guys to go through the HashMap or TreeMap article which goes over hashing as this topic has some of its features. So, What's the wait? Let's start! Suppose you guys are given the task of storing car names (yes, I love cars :p). Now, how would you store it? If you guys have some questions, here are the requirements. The car names may increase over time. So, logically, an array is not what we are looking for. Java Interview questions and tutorials Read: http://www.java67.com/2021/11/how-to-use-hashset-in-java-set-example.html

Retry or No? В этой статье разберем вариант реализации функционала перезапроса сообщений из семейства resilience шаблонов. Мы поговорим о retry. Точнее обсудим: 1. Что такое устойчивость и какое влияние на нее имеет retry? 2. Анализируем, где применять retry; 3. Реализуем retry; 4. Пишем unit-тесты с wiremock; 5.Делаем starter; Читать Читать: https://habr.com/ru/post/712964/?utm_campaign=712964