Чашечка Java
Відкрити в Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
Показати більше8 550
Підписники
-424 години
-137 днів
-3230 день
Архів дописів
8 551
Composite Design Pattern Example in Java and Object Oriented Programming
Hello guys, if you are wondering how to use Composite design pattern in Java then you are at the right place. Composite design pattern is another object oriented design pattern introduced by Gang of Four in there timeless classic book Design pattern : Elements of Reusable software. Composite pattern as name suggest is used to compose similar things together, like similar objects. It implements an interface and also contains other objects which implements the same interface, also known as containee. One of the best example of Composite pattern from Java standard library is Swing's container classes e.g. Panel, which not only are Components by themselves, but also contains other components like JButton, Label, JTable etc.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/08/composite-design-pattern-example-in.html
8 551
6 Advanced Comparator and Comparable Examples in Java 8
The JDK 8 release has completely changed the way you compare objects and sort them in Java. The new features of the Java 8 language e.g. lambda expression and method reference have made it easier to implement both Comparator and Comparable interface, as you don't need an Anonymous class for inline implementation. Now, you can create Comparators in just one line by using lambdas and method reference as we'll see in this article. Other features like providing default and static methods on interfaces have also made a huge difference when it comes to Comparator. They helped Java API designers to redesign and evolve existing interfaces, which wasn't possible earlier without breaking existing clients of those interfaces.
Java Interview questions and tutorials
Read: http://www.java67.com/2019/06/top-5-sorting-examples-of-comparator-and-comparable-in-java.html
8 551
Технологии NiFi & Kafka: применение (часть 2)
Добрый день, меня зовут Рустам Ахметов, я архитектор ГК Юзтех и интеграционной шины данных UseBus. В предыдущей статье я рассказывал о Kafka и её аналогах, а сегодня хочу рассмотреть NiFi.
Вы узнаете:
Читать: https://habr.com/ru/post/684312/?utm_campaign=684312
8 551
JSON Web Token (JWT) — пример Java реализации на Spring Boot OAuth2 Resource Server 6.0
Доброе время!
Часть 2-я по открытому занятию нового учебного курса: реализация простого JWT через новый Spring Boot OAuth2 Resource Server (первая часть: Spring Boot 3.0 — готовимся заранее). Что такое JWT и зачем, писать здесь не буду - в сети материалов много, начинать знакомство обычно рекомендую с Википедии. А вот хорошая ссылка по реализации JWT+OAuth2. Здесь я привожу Java код, основанный на официальном примере spring-projects - простейшей реализации JWT Login Sample (без refresh token и отдельного авторизационного сервера), "творчески доработанный" и с моими пояснениями. Еще раз - без теории, для тех, кому интересен код актуальной Java реализации. Если это Вы - прошу
к прочтению.
Читать: https://habr.com/ru/post/684270/?utm_campaign=684270
8 551
Сделайте первые шаги к созданию отказоустойчивых и масштабируемых архитектур на двух открытых уроках в OTUS
Уроки рассчитаны на веб-разработчиков, тимлидов, архитекторов, технических руководителей и специалистов, которые интересуются SRE или работают в этой области и пройдут в рамках онлайн-курса «Highload Architect».
29 августа в 20:00 мск — «Принципы организации микросервисов. Типы взаимодействий». Проанализируете плюсы и минусы микросервисов, а также разберёте инструменты для построения микросервисов: https://otus.pw/h9pz/
12 сентября в 20:00 мск — «Паттерны декомпозиции системы на микросервисы». Познакомитесь с паттернами декомпозиции системы на микросервисы и рассмотрите технические и бизнесовые подходы к декомпозиции: https://otus.pw/DhJY/
Это #партнёрский пост
8 551
How to convert String to long in Java? Example
You can parse a String literal containing valid long value into a long primitive type using parseLong() and valueOf() method of java.lang.Long class of JDK. Though there is a couple of difference between valueOf() and parseLong() method e.g. valueOf() method return a Long object while parseLong() method return a Long object, but given we have autoboxing in Java, both method can use for parsing String to create long values. In the last article, you have learned how to convert a Long value to a String in Java,and in this tutorial, you will learn the opposite, i.e. how to parse a String to a long value in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2015/07/how-to-parse-string-to-long-in-java.html
8 551
How to convert String to Double in Java and double to String with Example
There are three ways to convert a String to double value in Java, Double.parseDouble() method, Double.valueOf() method and by using new Double() constructor and then storing the resulting object into a primitive double field, autoboxing in Java will convert a Double object to the double primitive in no time. Out of all these methods, the core method is parseDouble() which is specially designed to parse a String containing floating-point value into the Double object. Rest of the methods like valueOf() and constructor uses parseDouble() internally. This method will throw NullPointerException if the string you are passing is null and NumberFormatException if String is not containing a valid double value e.g. containing alphabetic characters.
Java Interview questions and tutorials
Read: http://www.java67.com/2015/06/how-to-convert-string-to-double-java-example.html
8 551
How to check if two String variables are same in Java? equals(), equalsIgnoreCase() and == operator Example
There are multiple ways to compare two strings alphabetically in Java e.g. == operator, equals() method or compareTo() method, but which one is the best way to check if two strings are equal or not? Programmers often confused between == operator and equals() method, and think that comparing strings using == operator should be faster than equals() method, and end up using that. Though they are not completely wrong, they often missed the point that == operator is designed to compare object equality,not String equality, which is actually defined in equals()method and compare Strings alphabetically.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/08/best-way-to-compare-two-strings-in-java.html
8 551
Processing Data with Kotlin Dataframe Preview
Kotlin DataFrame, available as a first public preview, is a new library for processing data from any source, such as CSV, JSON, Excel and Apache Arrow files. The DataFrame works together with Kotlin data classes and hierarchical data schemas by using a Domain Specific Language (DSL).
By Johan Janssen
Read: https://www.infoq.com/news/2022/08/kotlin-dataframe-preview/
8 551
Why Java Does Not Support Destructor?
Read: https://www.thejavaprogrammer.com/why-java-does-not-support-destructor/
8 551
Spring Boot 3.0 — готовимся заранее
Здравствуй, читатель Хабра!
До выхода Spring Boot 3 осталось совсем немного - 3 месяца. Уже появляются статьи -
What’s New, It's time to get ready. Недавно JetBrains выпустила IDEA с поддержка Spring 6 и Spring Boot 3. Самое время потренироваться заранее в миграции. В разработке нового учебного курса я попробовал перевести свой открытый учебный проект Spring Boot 2.x + HATEOAS на Spring Boot 3, шаги и код проекта ниже.
Читать: https://habr.com/ru/post/683936/?utm_campaign=683936
8 551
Java News Roundup: JDK 19-RC1, Multiple Spring Updates, Micronaut, Helidon, Payara
This week's Java roundup for August 15th, 2022, features news from JDK 19, JDK 20, Spring Boot versions 2.7.3 and 2.6.11, Spring Authorization Server versions 1.0.0-M1 and 0.4.0-M1, Spring Security versions 5.7.3 and 5.6.7 and 5.8.0-M2, Spring Cloud Dataflow 2.9.5, Spring Shell 2.1.1, Payara Platform 5 Community Edition, Micronaut 3.6.1, Helidon 3.0.1 and Apache Camel 3.14.5.
By Michael Redlich
Read: https://www.infoq.com/news/2022/08/java-news-roundup-aug15-2022/
8 551
Spring Authorization Server 1.0 Planned for November 2022
Spring Authorization Server 1.0 is planned for a GA release in November 2022, after starting the project two years ago. The Spring Authorization Server project replaces the, already End of Life, Spring Security OAuth project. The project is led by the Spring Security team and delivers support for OAuth 2.1 Authorization Server for Spring applications.
By Johan Janssen
Read: https://www.infoq.com/news/2022/08/spring-authorization-server-1-0/
8 551
ArrayList.contains(), size(), clear, asList(), subList(), toArray(), and isEmpty() Example in Java
Java ArrayList Example
ArrayList in Java is one of the most popular Collection classes. ArrayList is an implementation of the List interface via AbstractList abstract class and provides an ordered and an index-based way to store elements. Java ArrayList is analogous to an array, which is also index-based. In fact, ArrayList in Java is internally backed by an array, which allows them to get constant time performance for retrieving elements by index. Since an array is fixed length and you can not change their size, once created, Programmers, starts using ArrayList, when they need a dynamic way to store object, i.e. which can re-size itself. See the difference between Array and List for more differences.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/03/java-arraylist-how-to-example-and.html
8 551
How to Read User Input and Password in Java from command line? Console Example
Hello guys, if you are wondering how to take user input from command prompt in Java like username and password then don't worry. Java provides several utilities like Scanner and BufferedReader to read input from command prompt in Java. Java 6 added a new utility class for reading input data from character based devices including command line. java.io.Console can be used to read input from command line, but unfortunately, it doesn't work on most of the IDE like Eclipse and Netbeans. As per Javadoc call to System.Console() will return attached console to JVM if it has been started interactive command prompt or it will return null if JVM has been started using a background process or scheduler job.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/05/reading-input-and-password-from-command-prompt-Console-example.html
8 551
How to replace characters and substring in Java? String.replace(), replaceAll() and replaceFirst() Example
One of the common programming tasks is to replace characters or substring from a String object in Java. For example, you have a String "internet" and you want to replace the letter "i" with the letter "b", how do you that? Well, the String class in Java provides several methods to replace characters, CharSequence, and substring from a String in Java. You can call replace method on the String, where you want to replace characters and it will return a result where characters are replaced. What is the most important point to remember is that the result object would be a new String object?
Java Interview questions and tutorials
Read: http://www.java67.com/2013/03/how-to-replace-string-in-java-character-example.html
8 551
Where Is Python Used In The Real World?
Hello guys, if you are wondering where is Python used in real world before you decide whether to learn Python programming language or not then its actually a good question. While everyone is talking about Python's popularity, it make sense to do research and find out which industries in Software development is using Python as their primary language. You will be surprised to know that like Java Python is also almost everywhere. Python is now used in Artificial Intelligence, Web Development, Game Development, Building Desktop and UI Apps, Machine Learning, Data Science, Data Analysis, Building Mobile apps, Web Scrapping, and most importantly on Automation. So, you can see that Python is widely accepted and used and learning Python is the best decision you can take to start your career as Software Developer.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/08/where-is-python-used-in-real-world.html
8 551
How to use @PropertySource Annotation in Java and Spring? Property Source Example
Hello Java developers, if you are wondering What is property source in Spring Framework and how to use @PropertySource annotation then you have come to the right place. Earlier, I have shared the best books and online courses to learn Spring Frameworkand in this article, I will teach you how to use @PropertySource annotation in Spring to read Environment variables and inject properties using @Value annotation. In the Spring application, one of the files that are needed to provide properties to the Spring environment is the @Configuration classes.
Java Interview questions and tutorials
Read: http://www.java67.com/2021/10/what-is-property-source-in-spring.html
8 551
Top 24 Node.js Interview Questions with Answers for 1 to 2 Years Experienced Web Developers
Hello guys, if you are preparing for a JavaScript developer or web developer and looking for common Node.js questions to prepare for interviews then you are at right place. In the past, I have shared JavaScript interview questions, React Questions, Angular Questionsand even web development questionsand in this article, I am going to share frequently asked Node.js questions with answers for interviews. Though Node.js is defined as a JavaScript environment, it is widely considered as a backend framework. Since its inception in 2008, Node.js has become a popular term in the server-side development community. More and more companies are using Node.js for backend development.
Java Interview questions and tutorials
Read: http://www.java67.com/2022/02/nodejs-interview-questions-with-answers.html
8 551
Difference between StringBuilder and StringBuffer in Java with Example
If you are in a hurry and heading straight to interview then I won't take much of your time, In a couple of words, the main difference between StringBuffer and StringBuilder is between four parameters, synchronization, speed, thread-safety, and availability. StringBuffer is synchronized and that's why thread-safe, but StringBuilder is not synchronized, not thread-safe and that's why fast. Regarding availability, StringBuffer is available from Java 1.0 while StringBuilder was added in Java 5.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/05/difference-between-stringbuilder-and-StringBuffer-java.html
Вже доступно! Дослідження Telegram за 2025 — головні інсайти року 
