Чашечка Java
رفتن به کانال در Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
نمایش بیشتر8 292
مشترکین
+1224 ساعت
+77 روز
-5530 روز
آرشیو پست ها
8 295
How to check If two Strings Array are equal in Java? Example Tutorial
Hello guys, if you are wondering how to check if two given String array are equal, I mean they contain same number of elements with same values and looking for solution then you have come to the right place. In the past, I have shared several coding questions on different data structures like linked list, binary tree, string, and even system design and today, we shall be working with arrays, Oh arrays are so pretty! And it’s very simple to learn. Having understood the concept of arrays the goal is to be able to check if two String arrays are equivalent.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/01/how-to-check-if-two-strings-array-are.html
8 295
How to use WeakHashMap in Java? Example Tutorial
Hello friends, we are here today again on our journey to Java. I hope everyone is fine and ready to board our train of knowledge. Today we are gonna learn something very interesting and very exciting. Today's topic will definitely be very useful in coding and programming. This topic would surely decrease your time complexity, and space requirements for any task very significantly :p So what's the wait? Let's start!
As always, we will start understanding today's topic by a scenario. But, before that, you guys must know what a HashMap is. So, go through the HashMap article before jumping on this one, and you will get a better understanding of today's article. For the guys who have already gone through HashMap before, let me give a brief intro and what a HashMap is so we all can refresh the topic easily.
Java Interview questions and tutorials
Read: http://www.java67.com/2021/10/how-to-use-weakhashmap-in-java-example.html
8 295
What is Diamond operator in Java? Example Tutorial
The Diamond operator is a relatively new operator in Java which was first introduced in JDK 7 to improve type inference and reduce boilerplate Java coding. It is denoted with a closed angle bracket that resembles the shape of adiamond () and that's why it's called the Diamond operator. If used correctly it can reduce typing and boilerplate coding in Java and result in much cleaner and readable code especially when you use Generics.
Java Interview questions and tutorials
Read: http://www.java67.com/2021/09/what-is-diamond-operator-in-java-how.html
8 295
How to Join and Merge Two ArrayLists in Java - Example Tutorial
You can use the addAll() method from java.util.Collection interface to join two ArrayLists in Java. Since ArrayList implements List interface which actually extends the Collection interface, this method is available to all List implementations including ArrayList e.g. Vector, LinkedList. The Collection.addAll(Collection src) method takes a collection and adds all elements from it to the collection which calls this method like target.addAll(source). After this call, the target will have all elements from both source and target ArrayList, which is like joining two ArrayList in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2016/07/how-to-join-two-arraylist-in-java.html
8 295
What is Iterator in Java? Example
Hello guys, if you are wondering what is Iterator in Java and how does it work? when you are supposed to use Iterator and what advantages or disadvantages it provide over other methods of iterating over Java Collections then you have come to the right place. In the past, I have shared how HashMap works in Javaand How Garbage collection worksand in this article, I am going to share how Iterator works and how they simplify iteration irrespective of different collection types. You all may know about Java collections. It has many lists, maps, etc in it. Now, you may know how to use the inbuilt LinkedList or any other collection, but once that collection is built, how will you iterate over it? I know you all are thinking of loops.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/04/what-is-iterator-in-java-example.html
8 295
Difference between 32-bit vs 64-bit JVM in Java?
Hello Java Programmers, if you want to learn Java virtual Machine in-depth and wondering what is the difference between a 32-bit and 64-bit JVM and which one should you use and why? then you have come to the right place. Earlier, I have shared the best JVM booksand online JVM coursesand in this article, I am going to talk about 32-bit vs 64-bit JVM and their pros and cons. This is also a common Java interview question for beginners and intermediate Java programmers. I have tried to answer this question to the point that's why this article is a short but informative one. You will find out what they are, how they are different, how much heap size, and the pros and cons of each of them.
Java Interview questions and tutorials
Read: http://www.java67.com/2019/12/difference-between-32-bit-vs-64-bit-jvm.html
8 295
CWE Top 25 2022. Обзор изменений
Список CWE Top 25 отражает наиболее серьёзные недостатки безопасности ПО. Предлагаю вам ознакомиться с обновлённым топом в обзоре изменений за прошедший год.
Читать: https://habr.com/ru/post/677440/?utm_campaign=677440
8 295
Java News Roundup: Microsoft Joins MicroProfile and Jakarta EE, GlassFish, Payara, Micronaut
This week's Java roundup for July 11th, 2022, features news from JDK 19, JDK 20, Microsoft joins MicroProfile and Jakarta EE working groups, Jakarta EE 10 update, Spring updates, Payara Enterprise 5.41.0, GlassFish 7.0-M7, Micronaut 3.5.3, Hibernate Search 6.2.Alpha1, Native Build Tools 0.9.13, Project Reactor 2022.0.0-M4, Piranha 22.7.0, PrimeFaces updates, JobRunr 5.1.5 and Tomcat Native 2.0.1.
By Michael Redlich
Read: https://www.infoq.com/news/2022/07/java-news-roundup-jul11-2022/
8 295
В 2022 году Росатом приобрёл контроль над AT Consulting, купив IT-интегратора за 20 млрд рублей
Компания усилила своё влияние как одна из крупнейших корпораций России в сфере IT, выполнила множество масштабных проектов, повлиявших на развитие отрасли IT-услуг, реализованных по заказу как российских, так и зарубежных компаний. Сейчас у них есть большое количество вакансий для IT-специалистов.
Junior, middle, senior — найдётся вакантное место для любого уровня. Переходите по ссылке и найдите вакансию мечты: https://tprg.ru/NV3x
Это #партнёрский пост
8 295
Java on Visual Studio Code Update – July 2022
Read: https://devblogs.microsoft.com/java/java-on-visual-studio-code-update-july-2022/
8 295
Каналы по конкретным направлениям разработки, подборки полезных ресурсов, канал для начинающих, новости, мемы — в экосистеме Tproger есть канал для каждого разработчика.
Если ещё не подписаны на какой-то из каналов по интересующей вас теме, то исправляйте это: @tproger_channels
8 295
Получение generic-типа в runtime
src
В Java 5 появились generic-типы, а вместе с ним и концепция type erasure, которая буквально означает стирание информации о generic-типе после компиляции. Действительно, во многих случаях это просто синтаксический сахар, помогающий писать типо-безопасный код на уровне компиляции, и в runtime с такими типами работать нельзя. Например, невозможно получить тип Tвнутри ArrayList<t, поэтому он в своей реализации создает массив Object[], а не T[]для хранения элементов.
Однако, в ряде случаев это очень даже возможно. Например, можно объявить поле
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanPostProcessor;
...
@Autowired
private Set<beanpostprocessor beanPostProcessors;
и spring в него заинжектит все объекты контекста, которые реализуют интерфейс BeanPostProcessor.
Можно написать и так:
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
...
List<string strings = new ObjectMapper()
.readValue("[1, 2, 3]", new TypeReference() {});
// все элементы strings - строки (не Integer и не Long)
List<integer ints = new ObjectMapper()
.readValue("[1, 2, 3]", new TypeReference() {});
// все элементы ints - Integer (не String и не Long)
Можно написать даже так:
Читать: https://habr.com/ru/post/588252/?utm_campaign=5882528 295
Top 50 Java Coding Interview Questions for 3 to 5 Years Experienced
Hello guys, if you are learning to code and programming, or preparing for a programming job interview and looking for some practice material then you have come to the right place. Earlier, I have shared the best string, array, linked list, and binary tree coding problems and In this article, I am going to share some of the most commonJava coding and programming problems for beginners. These are the problems, I have solved myself to learn to program and develop a coding sense and these are the ones that keep coming on Java coding interviews. By going through these coding problems you will not only learn Java but also prepare yourself for Java interviews.
Java Interview questions and tutorials
Read: http://www.java67.com/2020/03/top-50-java-coding-programming-problems-solutions.html
8 295
Top 18 CSS Interview Questions and Answers for 1 to 2 years experienced
CSS is one of the three core technologies of the World Wide Web(WWW). A website is incomplete without CSS. The first feature of a website noted by the visitors is its presentation. It does not matter how excellent the behind-the-scenes of a website are, if the client-side view is not appealing, the website is almost a failure. Thus, CSS is as important as JavaScript. A web development job interview is incomplete without CSS questions. Even, there is a job market for CSS professionals. CSS can be tricky. Initially, it seems simple and easily understandable. But you advance through various concepts, you will find it is quite complicated and complex.
Java Interview questions and tutorials
Read: http://www.java67.com/2021/09/-css-interview-questions-and-answers-for-.html
8 295
21 Examples to convert Data Types in Java - Tutorial
Hello guys, converting one data type to another, for example String to Integer or String too boolean is a common task in Java and every Java programmer should be familiar with how to convert common data types like String, Integer, Long, Float, Double, Date, List, Map, Set, to each other. In the past, I have shared several tutorial where I have shown you how to carry out such conversion in Java and this articile is nothing but a collection of such tutorial so that you can learn all of that knowledge in one place. You can also bookmark this page as I will be adding new data type conversion tutorials into this list as and when I write them, and you can also suggest if you struggle to convert a particular type to another and I will try to cover them here.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/07/21-examples-to-convert-data-types-in.html
8 295
Top Java Blogs Weekly: Best of 30/2022
Best of Top Java Blogs, year 2022, week 30
Read: https://www.topjavablogs.com/news/best-of-30-2022
8 295
Как стать уверенным разработчиком на главном языке «энтерпрайза» Java?
Например, записаться на курс по Java-разработке от Хекслета. Курс поможет освоить язык, алгоритмы и структуры данных, работу с микросервисами, фреймворком Spring Boot, базами данных и инфраструктурой.
На Хекслете курс спроектирован так, что его невозможно просто «отсидеть» или «прослушать». Именно поэтому студенты могут получить оффер ещё во время обучения, а некоторые работодатели указывают их курсы как преимущество при найме.
Узнайте подробнее о программе курса, преподавателях и выпускниках и начните изучать Java уже сейчас: https://tprg.ru/vMIh
Это #партнёрский пост
8 295
Double, Float — не вещественные числа
Во многих источниках тип double и float, числа с плавающей запятой/точкой зачем-то называют вещественными. Такое чувство что кто-то когда-то совершил ошибку или не внимательно написал эту глупость и все как один начали её повторять, совершенно не задумываясь о чём они говорят.
Ладно это были бы просто троечники студенты и любители, так эту ошибку говорят и те, кто обучают специалистов. И эта проблема терминологии не одного ЯП, их правда много (Java, C++, C#, Python, JS и т.д.) везде, где бы я не искал, всегда находятся статьи, ответы, лекции, где дробные числа называют вещественными!
Читать: https://habr.com/ru/post/677294/?utm_campaign=677294
8 295
So why did they decide to call it Java?
Read: https://www.infoworld.com/article/2077265/so-why-did-they-decide-to-call-it-java.html#tk.rss_java
