Чашечка Java
Відкрити в Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
Показати більше8 554
Підписники
-424 години
-197 днів
-2530 день
Архів дописів
8 553
How to Iterate over Java Enum : values() Example
Enum Values() Example
In this Java programming tutorial, we will learn how to iterate over enum in Java. Since Enums are a collection of a finite number of well-known objects, often we need to iterate over them. Enums are also final in Java and have a private constructor, which means you can not create enum instances once declared. Iteration over Enum is extremely simple, provided you know about the implicit values() method, which is a static method, provided by java.lang.Enum. Since every enum in Java extends java.lang.Enum, they all get this implicit values() method. Actually there are couple of them, e.g. valueOf(), name(), ordinal() etc. This method returns enum constants in the order they are declared in the Enum class. Even the ordinal() method returns the same order.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/03/how-to-iterate-over-java-enum-values.html
8 553
How to Split String in Java using Regular Expression
String class provides split() method to split String in Java, based upon any delimiter, e.g. comma, colon, space or any arbitrary method. split() method splits the string based on delimiter provided, and return a String array, which contains individual Strings. Actually, split() method takes a regular expression, which in simplest case can be a single word. split() is also overloaded method in java.lang.String class and its overloaded version take a limit parameter which is used to control how many times the pattern will be applied during the splitting process. if this limit is positive n, then the pattern will be applied at most n-1 times, if it's negative or zero then split operation is applied any number of times.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/03/how-to-split-string-in-java-regular-expression.html
8 553
Difference between Deep and Shallow Copy in Java Object Cloning
Shallow copy and deep copyis related with cloning process so before go into the deep of shallow and deep copy we need to understand what is clone in java. Clone is nothing but the process of copying one object to produce the exact object, which is not guaranteed. We all know in Java object is referred by reference we can not copy one object directly to another object. So we have a cloning process to achieve this objective. Now one question arises in mind why we need this process so the answer is whenever we need a local copy of the object to modify the object in some method but not in the method caller.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/05/difference-between-deep-copy-vs-shallow-cloning-java.html
8 553
How to Create File and Directory in Java with Example
Many beginners confused with the fact that the same class java.io.File is used to create both file and directories in Java. I agree, this is not very intuitive and junior developers probably start looking for a class called java.io.Directory, which doesn't exist. On the other hand, creating file and directories are simple in Java, as java.io.File provides methods like createNewFile() and mkdir() to create new file and directory in Java. These methods returns boolean, which is the result of that operation i.e. createNewFile() returns true if it successfully created file and mkdir() returns true if the directory is created successfully.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/02/how-to-create-file-and-directory-in-java.html
8 553
When to use ArrayList vs LinkedList in Java? [Answered]
When to use ArrayList or LinkedList in Java is one of the most popular Java interview questions and also asked as a difference between ArrayList and LinkedList. Earlier, I have shared common Java collections interview questions and in this article, I will explain the difference between them. ArrayList and LinkedList are two popular concrete implementations of the List interface from Java's popular Collection framework. Being List implementation both ArrayList and LinkedList are ordered, the index-based and allows duplicate. Despite being from the same type of hierarchy there are a lot of differences between these two classes which makes them popular among Java interviewers.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/12/difference-between-arraylist-vs-LinkedList-java.html
8 553
Java Regular Expression to Check If String contains at least One Digit
This week's task is to write a regular expression in Java to check if a String contains any digit or not. For example, passing "abcd" to pattern should false, while passing "abcd1" to return true, because it contains at least one digit. Similarly passing "1234" should return true because it contains more than one digit. Though java.lang.String class provides a couple of methods with inbuilt support of regular expression like split method, replaceAll(), and matches method, which can be used for this purpose, but they have a drawback. They create a new regular expression pattern object, every time you call. Since most of the time we can just reuse the pattern, we don't need to spend time on creating and compiling patterns, which is expensive compared to testing a String against the pattern.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/01/java-regular-expression-to-check-numbers-in-String.html
8 553
12 Advanced Java programming Books for Experienced Programmers - Part 2
This is the second part of 12 must-reads advanced Java programming books for intermediate and experienced Java programmers. In the first part, I have shared books to learn and master concurrency, performance, design patterns, and Java collection framework, which is essential for every Java developer irrespective of experience. On the other hand, In this article, I will talk about more advanced concepts, like security, Java 8, best practices, etc., which are more important for senior Java developers. As an experienced Java developer, a lot is expected of you. Junior developers look at you for guidance, and project managers look at you to solve problems and bail them out at critical junctures.
Java Interview questions and tutorials
Read: http://www.java67.com/2017/01/12-advanced-java-programming-books-for-experienced-programmers.html
8 553
Вопросы, которые я бы хотел услышать на техническом собеседовании
Я занимаюсь разработкой больше 10 лет, прошел множество разных собеседований на самые разные позиции, и вот какая мысль сегодня пришла мне в голову. Ни на одном собеседовании мне не задавали вопросов, которые бы действительно осветили мой опыт и знания, а главное - ценность как сотрудника, эффективно решающего задачи.
На написание статьи меня подтолкнула собственная боль, пронесенная через года, размышления о роли Google и GPT в работе программиста и старый анекдот про инженера и объем резинового мяча.
Читать: https://habr.com/ru/articles/728572/?utm_campaign=728572
8 553
EventMesh Serverless Platform Promoted to Apache Top-Level Project
Apache EventMesh is a fully serverless platform used to build distributed event-driven applications and last month has graduated to Top-Level Project of Apache Software Foundation. EventMesh uses a publish/subscribe pattern to enable serverless, event-driven capabilities for a wide variety of components and applications
By Andrea Messetti
Read: https://www.infoq.com/news/2023/04/eventmesh-serverless/
8 553
OpenJDK proposal would make Java easier to learn
Read: https://www.infoworld.com/article/3692877/openjdk-proposal-would-make-java-easier-to-learn.html#tk.rss_java
8 553
Hands-on with Java and Wasm
Read: https://www.infoworld.com/article/3692456/hands-on-with-java-and-wasm.html#tk.rss_java
8 553
Difference between Mockito.mock(), @Mock and @MockBean annotation in Spring Boot
Hello guys, if you are wondering what is the difference between Mockito.mock(), @Mock and @MockBean annotation in Spring Boot then you have come to the right place. In the Spring Boot framework, @Mock and @MockBean are both annotations used for creating mock objects in unit testing scenarios. However, they are used in different contexts and have some differences in their behavior which you will find in this article. In the past, I have shared difference between @Controller and @Service as well @RequestParam vs @PathVariable and in this article, I will explain the difference between @Mock and @MockBean annotations in Spring Boot. To be honest, I love this kind of questions as it not only help on interviews but also help to learn the concept better and you should also love them too.
Java Interview questions and tutorials
Read: http://www.java67.com/2023/04/difference-between-mockitomock-mock-and.html
8 553
Подборка актуальных вакансий
— Java-разработчик
Где: удалённо
Опыт: от 1 года
— Senior Java-разработчик
Где: удалённо
Опыт: от 2 лет
— Java-разработчик
Где: удалённо
Опыт: от 3 лет
— Старший Java-разработчик
Где: Москва, можно удалённо
Опыт: от 3 лет
— Главный разработчик
Где: Москва, можно удалённо
Опыт: от 3 лет
— Android-разработчик
Где: Москва, можно удалённо
Опыт: от 3 лет
— Senior Android-разработчик
Где: Москва, можно удалённо
Опыт: от 3 лет
#вакансии #работа
8 553
How to Convert java.util.Date to java.sql.Date - Example
Hello guys, you may not know but there are two date classes in Java, one in java.util package and other in the java.sql package. Though both are known as Date class, there is some difference between java.util.Date and java.sql.Datee.g. Former is used whenever a Date is required in Java application while later is used to read and store DATE SQL type from the database. There is one more important difference is, java.util.Date stores both date and time values, while java.sql.date only stores date information, without any time part. As per Javadoc, java.sql.date is a thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value. To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated. See SQL date vs Util date for few more differences.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/02/how-to-convert-javautildate-to-javasqldate-example.html
8 553
How to find largest and smallest number from integer array - Java Solution
Hello guys, if you have gone through any coding interview or have done some professional Software development then you know that a good understanding of array data structure is crucial for any software developer but it doesn't come for free, you need to spend time and effort. The best way to develop this understanding by solving coding problems and there are lots of programming exercisesbeginners can do. One of them is writinga program to find the smallest and largest number in an integer array. Java programmers are no different than others, so they can do this program in Java, not just to understand array but also different relational operators available in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/02/how-to-find-largest-and-smallest-number-array-in-java.html
8 553
Difference between GET and POST Request in HTTP and REST APIs
HTTP Protocol supports many methods to retrieve data from the server or perform any operation on the server, like upload data, delete the file, etc. In total, the HTTP protocol supports the following methods, GET, POST, PUT, DELETE, HEAD, DELETE, OPTIONS, and TRACE, and the HTTP 1.1 reserves technique called CONNECT for future use. GET, and POST is two of the most common HTTP methods you would hear or work on the web. Though both can be used to send and receive data from client to server, there are somecrucial differences between the GET and POST in HTTP, which will help you to understand when you should use GET vs. POST while writing your client and server application.
Java Interview questions and tutorials
Read: http://www.java67.com/2014/08/difference-between-post-and-get-request.html
8 553
How to Prepare for Java Certifications like OCAJP, OCPJP, or Java SE 11 Developer?
There is No doubt that Oracle's Java certification is one of the most valuable certifications for the IT industry and helps you to get a better job, better pay, and a better rise in your current salary. It also improves your recognition and job prospects because many big clients demands certified Java programmers for their mission-critical applications. Because of enormous popularity and usefulness, many Java developers and computer science graduates aspire for Java certifications. I often receive queries like, what is the best way to prepare for Java certifications like OCAJP or OCPJP?
Java Interview questions and tutorials
Read: http://www.java67.com/2017/05/how-to-prepare-for-java-certifications.html
8 553
Top 5 Books to Learn Groovy and Grails for Java Programmers - Best of Lot
If you want to learn Groovy and Grails and looking for the best resources then you have come to the right place. Earlier, I have shared some of the must-read Groovy books, and today, I'll share some of the best books to learn Grails for Java developers. Grails is a web application development framework completely written in Groovy. The Grails and Gradle framework are built using the Groovy language. Grails is the framework to develop a web application using Groovy. The concepts within Grails, like interceptors, tag libs, and Groovy Server Pages (GSP) are very similar to what we have in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2021/03/best-grails-groovy-books-for-java-programmers.html
8 553
How to Print all leaf Nodes of a Binary tree in Java [ Coding Interview Questions]
This is another interesting coding problem that is based on a binary tree and mostly asked beginner programmers. If you have some experience in solving binary tree-based problems then it's rather easy to solve because, like many other binary tree algorithms, you can use recursion to print all leaf nodes of a binary tree in Java. Since the tree is a recursive data structure, you can apply the same algorithm to both the left and right subtree. In order to solve this problem, the first thing you should know is what is a leaf node because if you don't know that then you won't be able to solve the problem. Well, a leaf node is the one whose left and right child nodes are null.
Java Interview questions and tutorials
Read: http://www.java67.com/2016/09/how-to-print-all-leaf-nodes-of-binary-tree-in-java.html
Вже доступно! Дослідження Telegram за 2025 — головні інсайти року 
