ch
Feedback
Чашечка Java

Чашечка Java

前往频道在 Telegram

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

显示更多
8 558
订阅者
无数据24 小时
-147
-1330
帖子存档
Рейтинг лучших программистов в мире 2023: анонс Объявляем батл за звание лучшего программиста мира. Читатели Tproger смогут в
Рейтинг лучших программистов в мире 2023: анонс Объявляем батл за звание лучшего программиста мира. Читатели Tproger смогут выяснить, кто самый крутой айтишник в мире. Читать: «Рейтинг лучших программистов в мире 2023: анонс»

Difference between an ordered and a sorted collection in Java? Example Tutorial Hello guys, if you are working in Java collec
Difference between an ordered and a sorted collection in Java? Example Tutorial Hello guys, if you are working in Java collection framework then you may have heard about ordered as well as sorted collection classes. One of the related question to this concept is what is difference between ordered and sorted collection in Java, which is often asked to junior developers. In the past, I have shared 25 Java Collection interview questions as well as 130+ Java questions and in this article, I will answer this popular question. An ordered collection maintains the order of elements e.g. ArrayList maintains the insertion order of elements. Similarly LinkedHashMap can keep element in the order they are inserted or accessed. Java Interview questions and tutorials Read: http://www.java67.com/2023/07/difference-between-ordered-and-sorted.html

Инструментация байт-кода Java В рамках текущей статьи будет рассказано о способах инструментации байт-кода java или другим языком, внесения изменений в компилированный файлы java .class. Здесь будут приведены примеры работы с фреймворками Javaassist и ASM и базовое описание байт-кода. Читать: https://habr.com/ru/articles/750028/?utm_campaign=750028

Симуляция реальности: разбираемся в мок-серверах и пишем свой Однажды передо мной возник некий «чёрный ящик» — Шина, которая отвечает за преобразование данных из внешнего формата во внутренний. Какие внутри происходят преобразования, какие процессы, как идут запросы, потому что они очень большие, — непонятно. Логи есть, но они ограничены, к тому же часто запросы не логируются, потому что некоторые данные пользователей нельзя показывать. В попытках решить проблему и возник мок-сервер, как решение задачи понять, как работает «ящик», на каких принципах, и понять, правильно ли он работает. В статье разберём зачем нужен мок-сервер, как с ним работать, как выбрать, как написать свой, и нужно ли вообще писать или можно выбрать из готовых? Читать: https://habr.com/ru/companies/alfa/articles/749890/?utm_campaign=749890

JetBrains Unveils AI Assistant for IntelliJ-based IDEs and .NET Tools JetBrains, the software development company known for c
JetBrains Unveils AI Assistant for IntelliJ-based IDEs and .NET Tools JetBrains, the software development company known for creating the IntelliJ IDEA, has announced the introduction of a new AI Assistant in its Early Access Program (EAP) builds for all IntelliJ-based IDEs and .NET tools. This significant addition is aimed at transforming the landscape of software development tools by integrating generative AI and large language models into JetBrains' products. By A N M Bazlur Rahman Read: https://www.infoq.com/news/2023/07/jetbrains-unveils-ai-assistant/

Как использовать новые возможности Java 17 Рассказываем, как использовать обновления Java 17, чтобы повысить производительнос
Как использовать новые возможности Java 17 Рассказываем, как использовать обновления Java 17, чтобы повысить производительность и безопасность приложений. Читать: «Как использовать новые возможности Java 17»

Задачи по Java для начинающих Держите Java задачи с ответами для начинающих разработчиков: подойдут как для практики, так и д
Задачи по Java для начинающих Держите Java задачи с ответами для начинающих разработчиков: подойдут как для практики, так и для подготовки к собеседованию. Читать: «Задачи по Java для начинающих»

3 Examples to Loop Map in Java - Foreach vs Iterator There are multiple ways to loop through Map in Java, you can either use
3 Examples to Loop Map in Java - Foreach vs Iterator There are multiple ways to loop through Map in Java, you can either use a foreach loop or Iterator to traverse Map in Java, but always use either Set of keys or values for iteration. Since Map by default doesn't guarantee any order, any code which assumes a particular order during iteration will fail. You only want to traverse or loop through a Map, if you want to transform each mapping one by one. Now Java 8 release provides a new way to loop through Map in Java using Stream API and forEach method. For now, we will see 3 ways to loop through each element of Map. Java Interview questions and tutorials Read: http://www.java67.com/2014/05/3-examples-to-loop-map-in-java-foreach.html

5 Examples of Formatting Float or Double Numbers to String in Java Formatting floating point numbers is a common task in software development and Java programming is no different. You often need to pretty print float and double values up-to 2 to 4 decimal places in console, GUI or JSP pages. Thankfully Java provides lots of convenient methods to format a floating point number up to certain decimal places. For example you can use method printf() to format a float or double number to a output stream. However, it does not return a String. In JDK 1.5, a new static method format() was added to the String class, which is similar to printf(), but returns a String. By the way there are numerous way to format numbers in Java, you can use either DecimalFormat class, or NumberFormat or even Formatter class to format floating point numbers in Java. Java Interview questions and tutorials Read: http://www.java67.com/2014/06/how-to-format-float-or-double-number-java-example.html

How to Synchronize an ArrayList in Java with Example ArrayList is a very useful Collection in Java, I guess most used one as
How to Synchronize an ArrayList in Java with Example ArrayList is a very useful Collection in Java, I guess most used one as well but it is not synchronized. What this mean? It means you cannot share an instance of ArrayList between multiple threads if they are not just reading from it but also writing or updating elements. So how can we synchronize ArrayList?Well, we'll come to that in a second but did you thought why ArrayList is not synchronized in the first place? Since multi-threading is a core strength of Java and almost all Java programs have more than one thread, why Java designer does not make it easy for ArrayList to be used in such an environment? Java Interview questions and tutorials Read: http://www.java67.com/2014/12/how-to-synchronize-arraylist-in-java.html

How to add Zeros at the Beginning of a Number in Java [Left Padding Examples] How do you left pad an integer value with zeroes in Java when converting to a string? This is a common requirement if you are working in the finance domain. There are so many legacy systems out there that expect the input of a certain length, and if your input is shorter than the specified length, you got to add zeros at the beginning of the number to make them off the right length. Java has a rich API and thankfully neither converting an integer to String is difficult nor formatting String to add leading zeros. In fact, there are multiple ways to add zeros at the start of a number or numeric string, you can either use the powerful String.format() method or its close cousin printf() method, or you can go back to DecimalFormat class if you are still working in JDK 4. Formatting, in general, is a very useful concept and as a Java developer, you must have a good understanding of that. Java Interview questions and tutorials Read: http://www.java67.com/2014/10/how-to-pad-numbers-with-leading-zeroes-in-Java-example.html

photo content

3 Examples to Read FileInputStream as String in Java - JDK7, Guava and Apache Commons Java programming language provides streams to read data from a file, a socket and from other sources e.g. byte array, but developers often find themselves puzzled with several issues e.g. how to open connection to read data, how to close connection after reading or writing into file, how to handle IOException e.g. FileNotFoundException, EOFFileException etc. They are not confident enough to say that this code will work perfectly.  Well, not everyone expect you to make that comment, but having some basics covered always helps. For example In Java, we read data from file or socket using InputStream and write data using OutputStream. Inside Java program, we often use String object to store and pass file data, that's why we need a way to convert InputStream to String in Java. As a Java developer, just keep two things in mind while reading InputStream data as String : Java Interview questions and tutorials Read: http://www.java67.com/2014/05/3-examples-to-read-inputstream-as-String-Java-Guava-Commons.html

photo content

Эффективное и комплексное устранение утечек памяти в Android Цель этой статьи — изучить эффективные и комплексные решения  по нахождению и устранению утечек памяти в контексте Android-разработки. Стоит понимать, что утечка памяти чаще всего возникает из-за незнания технологии или собственного кода на подкапотном уровне, поэтому основной целью является научиться правильно писать код, учитывая специфику работы Java Memory Model, Garbage Collector и File descriptor. Читать дальше Читать: https://habr.com/ru/articles/749568/?utm_campaign=749568

How to reverse ArrayList in Java with Example You can reverse ArrayList in Java by using the reverse() method of java.util.Co
How to reverse ArrayList in Java with Example You can reverse ArrayList in Java by using the reverse() method of java.util.Collections class. This is one of the many utility methods provided by the Collections class e.g. sort() method for sorting ArrayList. The Collections.reverse() method also accepts a List, so you not only can reverse ArrayList but also any other implementation of List interface e.g. LinkedList or Vector or even a custom implementation. This method has a time complexity of O(n) i.e. it runs on linear time because it uses ListIterator of the given list.  It reverses the order of an element in the specified list. Java Interview questions and tutorials Read: http://www.java67.com/2015/01/how-to-reverse-arraylist-in-java-with.html

How to Read, Write XLSX File in Java - Apache POI Example No matter how Microsoft is doing in comparison with Google, Microsoft Office is still the most used application in software world. Other alternatives like OpenOffice and LiberOffice have failed to take off to challenge MS Office. What this mean to a Java application developer? Because of huge popularity of MS office products you often need to support Microsoft office format such as word, Excel, PowerPoint and additionally Adobe PDF. If you are using JSP Servlet, display tag library automatically provides Excel, Word and PDF support. Since JDK doesn't provide direct API to read and write Microsoft Excel and Word document, you have to rely on third party library to do your job. Fortunately there are couple of open source library exists to read and write Microsoft Office XLS and XLSX file format, Apache POI is the best one. It is widely used, has strong community support and it is feature rich. Java Interview questions and tutorials Read: http://www.java67.com/2014/09/how-to-read-write-xlsx-file-in-java-apache-poi-example.html

photo content

[recovery mode] Особенности разработки автотестов различными инструментами, а также статистика по использованию Попробуем разобраться в автоматизации тестирования ПО, сделаем обзор сервисов для автоматического тестирования, выясним, какой язык программирования лучше подходит для QA Automation. Вся информация основана в том числе на реальных событиях и моём реальном опыте. Читать: https://habr.com/ru/articles/749322/?utm_campaign=749322