Microsoft Announces Azure Spring Cloud Enterprise in Preview
Recently Microsoft announced Azure Spring Cloud Enterprise, a new managed service tier for Spring that is optimized for the needs of enterprise developers. The new enterprise tier is available in preview.
By Steef-Jan Wiggers
Read: https://www.infoq.com/news/2021/09/azure-spring-cloud-enterprise/
Recently Microsoft announced Azure Spring Cloud Enterprise, a new managed service tier for Spring that is optimized for the needs of enterprise developers. The new enterprise tier is available in preview.
By Steef-Jan Wiggers
Read: https://www.infoq.com/news/2021/09/azure-spring-cloud-enterprise/
Java News Roundup: Jakarta EE 10 Core Profile, OpenJDK, Open Liberty, Payara, Groovy and Quarkus
This week's Java roundup for September 6th, 2021, features news from Jakarta EE 10 introducing a new core profile, JEP 417, JDK 18, Open Liberty 21.0.0.10-beta, Payara August 2021 Roadmap Update webinar, Quarkus 2.2.2.Final, a new Micronaut Java library, Hibernate Search 6.1.0.Alpha1, GraalVM Native Build Tools 0.9.5, updates to versions of Groovy, and the JakartaOne Livestream 2021 conference.
By Michael Redlich
Read: https://www.infoq.com/news/2021/09/java-news-roundup-sep06-2021/
This week's Java roundup for September 6th, 2021, features news from Jakarta EE 10 introducing a new core profile, JEP 417, JDK 18, Open Liberty 21.0.0.10-beta, Payara August 2021 Roadmap Update webinar, Quarkus 2.2.2.Final, a new Micronaut Java library, Hibernate Search 6.1.0.Alpha1, GraalVM Native Build Tools 0.9.5, updates to versions of Groovy, and the JakartaOne Livestream 2021 conference.
By Michael Redlich
Read: https://www.infoq.com/news/2021/09/java-news-roundup-sep06-2021/
Java. Adapter Pattern in Game Server
Адаптер - это шаблон структурного проектирования, который позволяет объектам с несовместимыми интерфейсами взаимодействовать друг с другом.
Так же известен как “Обертка”.
Проблема
Чтобы продемонстрировать этот шаблон, я буду использовать упрощенный пример игровой механики, в которой есть интерфейс IEnemy, но один из врагов отличается от других и не имеет реализации метода атаки. Вместо этого этот конкретный враг (SpecialEnemy) накладывает заклинания .
о паттерне Адаптер
Читать: https://habr.com/ru/post/577220/?utm_campaign=577220
Адаптер - это шаблон структурного проектирования, который позволяет объектам с несовместимыми интерфейсами взаимодействовать друг с другом.
Так же известен как “Обертка”.
Проблема
Чтобы продемонстрировать этот шаблон, я буду использовать упрощенный пример игровой механики, в которой есть интерфейс IEnemy, но один из врагов отличается от других и не имеет реализации метода атаки. Вместо этого этот конкретный враг (SpecialEnemy) накладывает заклинания .
о паттерне Адаптер
Читать: https://habr.com/ru/post/577220/?utm_campaign=577220
Top 5 Free Online Courses to learn JavaScript in 2021 - Best of Lot
Hello guys, If you want to learn JavaScript in 2021 by yourself and looking for some free resources like books, sites, and tutorials, then you have come to the right place. Earlier, I have shared the...
Read: http://www.java67.com/2018/04/top-5-free-javanoscript-courses-to-learn.html
Hello guys, If you want to learn JavaScript in 2021 by yourself and looking for some free resources like books, sites, and tutorials, then you have come to the right place. Earlier, I have shared the...
Read: http://www.java67.com/2018/04/top-5-free-javanoscript-courses-to-learn.html
What is Redux Thunk in React.js? Example tutorial
Hello folks, This is the 3 part of my React for Java developer series and in the past two articles we have been focusing on statement management in React and we have seen that how to use manage state...
Read: http://www.java67.com/2021/09/what-is-redux-thunk-in-reactjs-example.html
Hello folks, This is the 3 part of my React for Java developer series and in the past two articles we have been focusing on statement management in React and we have seen that how to use manage state...
Read: http://www.java67.com/2021/09/what-is-redux-thunk-in-reactjs-example.html
Top 15 Linux and UNIX Interview Questions and Answers for 1to 3 Years Experienced
UNIX and Linux Interview Questions and AnswersHello guys, if you are preparing for technical interviews like Software developer or IT support and looking for some frequently asked Linux and UNIX...
Read: http://www.java67.com/2012/09/10-linux-and-unix-interview-questions-answers-wipro-tcs-capegemini.html
UNIX and Linux Interview Questions and AnswersHello guys, if you are preparing for technical interviews like Software developer or IT support and looking for some frequently asked Linux and UNIX...
Read: http://www.java67.com/2012/09/10-linux-and-unix-interview-questions-answers-wipro-tcs-capegemini.html
How to Format Date to String in Java 8 [Example Tutorial]
One of the common programming tasks in Java is to change the date format of a given Date or String. For example, you have something like "2017-01-18 20:10:00" and you want to convert it...
Read: http://www.java67.com/2018/01/how-to-change-date-format-of-string-in-java8.html
One of the common programming tasks in Java is to change the date format of a given Date or String. For example, you have something like "2017-01-18 20:10:00" and you want to convert it...
Read: http://www.java67.com/2018/01/how-to-change-date-format-of-string-in-java8.html
Что должен знать Java Software Engineer
Есть много разных понятий для человека, который занимается программированием: кодер, разработчик, программист и т.д. Мне же больше по душе такое понятие, как инженер-программист или software engineer, т.к. данное понятие охватывает наибольшее количество тем и направлений, необходимых для разработки. Это лично моё виденье.
Так чем же принципиально software engineer отличается от остальных регалий? Ответ достаточно прост и очевиден - набором знаний о технологиях и большим кругозором в сфере, которой он себя посветил. Кроме того, сталкиваясь с какой-либо проблемой или задачей, он уже понимает какой подход нужен для её решения, или знает, что надо "подтянуть", чтобы быть компетентным в данном вопросе.
Т.к. на данный момент мой основной язык программирования Java, то и рассматривать данный вопрос я буду со стороны Java. Однако общая концепция хорошо ложится на другие языки с небольшой корректировкой "под себя".
Цель статьи привести - познакомить читателя с предлагаемым мною набором знаний. Ниже я привожу набор направлений и технологий, которыми должен обладать с теоретической и практической точки зрения software engineer.
Читать: https://habr.com/ru/post/577888/?utm_campaign=577888
Есть много разных понятий для человека, который занимается программированием: кодер, разработчик, программист и т.д. Мне же больше по душе такое понятие, как инженер-программист или software engineer, т.к. данное понятие охватывает наибольшее количество тем и направлений, необходимых для разработки. Это лично моё виденье.
Так чем же принципиально software engineer отличается от остальных регалий? Ответ достаточно прост и очевиден - набором знаний о технологиях и большим кругозором в сфере, которой он себя посветил. Кроме того, сталкиваясь с какой-либо проблемой или задачей, он уже понимает какой подход нужен для её решения, или знает, что надо "подтянуть", чтобы быть компетентным в данном вопросе.
Т.к. на данный момент мой основной язык программирования Java, то и рассматривать данный вопрос я буду со стороны Java. Однако общая концепция хорошо ложится на другие языки с небольшой корректировкой "под себя".
Цель статьи привести - познакомить читателя с предлагаемым мною набором знаний. Ниже я привожу набор направлений и технологий, которыми должен обладать с теоретической и практической точки зрения software engineer.
Читать: https://habr.com/ru/post/577888/?utm_campaign=577888
Вышла Java 17
Вышла общедоступная версия Java 17. В этот релиз попало более 2700 закрытых задач и 14 JEP'ов. Изменения API можно посмотреть по этой ссылке.
Читать: https://habr.com/ru/post/577924/?utm_campaign=577924
Вышла общедоступная версия Java 17. В этот релиз попало более 2700 закрытых задач и 14 JEP'ов. Изменения API можно посмотреть по этой ссылке.
Читать: https://habr.com/ru/post/577924/?utm_campaign=577924
Java 17, the Next Long-Term Support Release, is Now Available
Oracle has released version 17 of the Java programming language and virtual machine. As the first long-term support release since JDK 11 in 2018, the final feature set includes 14 JEPs. Two of these, JEP 403 and JEP 411, generated some concerns within the Java community.
By Michael Redlich
Read: https://www.infoq.com/news/2021/09/java17-released/
Oracle has released version 17 of the Java programming language and virtual machine. As the first long-term support release since JDK 11 in 2018, the final feature set includes 14 JEPs. Two of these, JEP 403 and JEP 411, generated some concerns within the Java community.
By Michael Redlich
Read: https://www.infoq.com/news/2021/09/java17-released/
Защищаем свой код от багов: обзор пяти статических анализаторов для Java-кода
Статические анализаторы могут найти и исправить проблемный код Кратко рассмотрим популярные статические анализаторы для Java-кода.
Читать: «Защищаем свой код от багов: обзор пяти статических анализаторов для Java-кода»
Статические анализаторы могут найти и исправить проблемный код Кратко рассмотрим популярные статические анализаторы для Java-кода.
Читать: «Защищаем свой код от багов: обзор пяти статических анализаторов для Java-кода»
Java снова бесплатна
Тезисно:
Java 17 полна решимости пробить барьер, имеющийся на границе Java 8 и Java 9. Теперь, начиная с 17-ой версии, Oracle будет предоставлять Oracle JDK бесплатно, даже для коммерческих целей. Единственное чего делать нельзя — это перепродавать Oracle JDK.
В статье приведен перевод полного текста анонса с блога Oracle.
Читать: https://habr.com/ru/post/577966/?utm_campaign=577966
Тезисно:
Java 17 полна решимости пробить барьер, имеющийся на границе Java 8 и Java 9. Теперь, начиная с 17-ой версии, Oracle будет предоставлять Oracle JDK бесплатно, даже для коммерческих целей. Единственное чего делать нельзя — это перепродавать Oracle JDK.
В статье приведен перевод полного текста анонса с блога Oracle.
Читать: https://habr.com/ru/post/577966/?utm_campaign=577966
5 Free Courses to Crack Google Cloud Professional Data Engineer Certification Exam in 2021 - Best of Lot
Hello guys, If you are preparing for Google Cloud Professional Cloud Data Engineer certification or simply known as GCP Data Engineer exam in 2021 and looking for free online Google cloud...
Read: http://www.java67.com/2020/10/5-free-courses-to-pass-google-cloud-professional-data-engineer-certification-exam.html
Hello guys, If you are preparing for Google Cloud Professional Cloud Data Engineer certification or simply known as GCP Data Engineer exam in 2021 and looking for free online Google cloud...
Read: http://www.java67.com/2020/10/5-free-courses-to-pass-google-cloud-professional-data-engineer-certification-exam.html
Kotlin Null-Safety vs ClassLoader
Недавно я проходил собеседование и одним из вопросов, стал такой загадочный экземпляр:
"А какое главное преимущество системы типов Kotlin перед Java"?
Честно говоря, выделить какое преимущество считалось главным, оказалось неразрешимой для меня задачей: Nothing, отсутсвие Wildcard и First-Class Functions вместо Java-костыля с Functional Interface (имеется ввиду 8я версия Java) не заняли первых мест в личном топе интервьюера, который мне предложили угадать.
Оказалось что главное в Kotlin - возможность обьявить Nullable Type и Null Safety подход (Замечу, что по моему опыту собственные или библиотечные Optional или Maybe решают эту проблему, и пишутся за 10 минут на Java 7. А еще есть аннотации Nullable, позволяющие проверять поля в сompile-time. Короче, есть много способов заставить делать Null проверки в plain Java. Ну да ладно).
Но речь пойдет не о странных вопросах, связанных со вкусовыми предпочтениями интервьюеров относительно синтаксического сахара.
Дело в том, что Null Safety в Kotlin можно сломать, притом не выходя из под его безопасного купола в суровый дикий мир Java и Null-Referrences.
Как?
Long story short: ClassLoader ведет себя интересным образом при попытке загрузить статические поля классов рекурсивно ссылающиеся на классы друг-друга.
Под катом примеры кода и подробное объяснение того, как он обманывает проверки на Nullable. Я искренне надеюсь что специфические знания Java/Kotlin для статьи не нужны - я объясню все детали на ходу, и уложу расследование в 10 минут.
Начнем.
Читать: https://habr.com/ru/post/561962/?utm_campaign=561962
Недавно я проходил собеседование и одним из вопросов, стал такой загадочный экземпляр:
"А какое главное преимущество системы типов Kotlin перед Java"?
Честно говоря, выделить какое преимущество считалось главным, оказалось неразрешимой для меня задачей: Nothing, отсутсвие Wildcard и First-Class Functions вместо Java-костыля с Functional Interface (имеется ввиду 8я версия Java) не заняли первых мест в личном топе интервьюера, который мне предложили угадать.
Оказалось что главное в Kotlin - возможность обьявить Nullable Type и Null Safety подход (Замечу, что по моему опыту собственные или библиотечные Optional или Maybe решают эту проблему, и пишутся за 10 минут на Java 7. А еще есть аннотации Nullable, позволяющие проверять поля в сompile-time. Короче, есть много способов заставить делать Null проверки в plain Java. Ну да ладно).
Но речь пойдет не о странных вопросах, связанных со вкусовыми предпочтениями интервьюеров относительно синтаксического сахара.
Дело в том, что Null Safety в Kotlin можно сломать, притом не выходя из под его безопасного купола в суровый дикий мир Java и Null-Referrences.
Как?
Long story short: ClassLoader ведет себя интересным образом при попытке загрузить статические поля классов рекурсивно ссылающиеся на классы друг-друга.
Под катом примеры кода и подробное объяснение того, как он обманывает проверки на Nullable. Я искренне надеюсь что специфические знания Java/Kotlin для статьи не нужны - я объясню все детали на ходу, и уложу расследование в 10 минут.
Начнем.
Читать: https://habr.com/ru/post/561962/?utm_campaign=561962
How to use lifecycle methods in functional components in React.js? useEffect() hook Example Tutorial
Hello guys, if you have been following my blogs then you know that I have launched a new series - React for Java developers and this is the 4th article on the series. Earlier, we have seen state...
Read: http://www.java67.com/2021/09/ow-to-use-lifecycle-methods-in-functinal.html
Hello guys, if you have been following my blogs then you know that I have launched a new series - React for Java developers and this is the 4th article on the series. Earlier, we have seen state...
Read: http://www.java67.com/2021/09/ow-to-use-lifecycle-methods-in-functinal.html
What is the use of DispatcherServlet in Spring MVC? Interview Question Example
Hello guys, In today's article we are going to discuss one interesting and the important Spring MVC concept, which is also a popular Spring Interview question. How DispatcherServlet works...
Read: http://www.java67.com/2017/06/what-is-use-of-dispatcherservlet-in-spring-mvc.html
Hello guys, In today's article we are going to discuss one interesting and the important Spring MVC concept, which is also a popular Spring Interview question. How DispatcherServlet works...
Read: http://www.java67.com/2017/06/what-is-use-of-dispatcherservlet-in-spring-mvc.html
How to compare two Arrays in Java to check if they are equal - [String & Integer Array Example]
Hello guys, one of the common Programming, the day-to-date task is to compare two arrays in Java and see if they are equal to each other or not. Of course, you can't compare a String array to an...
Read: http://www.java67.com/2014/05/how-to-compare-two-arrays-in-java-string-int-example.html
Hello guys, one of the common Programming, the day-to-date task is to compare two arrays in Java and see if they are equal to each other or not. Of course, you can't compare a String array to an...
Read: http://www.java67.com/2014/05/how-to-compare-two-arrays-in-java-string-int-example.html
Top 6 Free Maven and Jenkins Online Courses for Java Programmers in 2021 [ UPDATED]
Hello Java programmers, if you want to learn Maven and Jenkins and look for free resources like free online courses, you have come to the right place. Earlier, I have shared the best Maven courses...
Read: http://www.java67.com/2018/02/6-free-maven-and-jenkins-online-courses-for-java-developers.html
Hello Java programmers, if you want to learn Maven and Jenkins and look for free resources like free online courses, you have come to the right place. Earlier, I have shared the best Maven courses...
Read: http://www.java67.com/2018/02/6-free-maven-and-jenkins-online-courses-for-java-developers.html
Fluent setter. Нарушаем конвенцию
Что будет, если возвращать в setter-методе не void, а this, т.е. использовать прием Fluent Interface?
Теперь перепишем типовой кусок кода и получим такое:
Для сравнения – как тот же код выглядит без использования приёма:
Читать: https://habr.com/ru/post/577478/?utm_campaign=577478
Что будет, если возвращать в setter-методе не void, а this, т.е. использовать прием Fluent Interface?
public class SimplePojo {
private String value;
public String getValue() {
return value;
}
public SimplePojo setValue(String value) {
this.value = value;
return this;
}
// equals, hashCode, toString
} Теперь перепишем типовой кусок кода и получим такое:
private static AssignmentGroupedActivitiesResource create() {
return new AssignmentGroupedActivitiesResource()
.setGrouping(new UserActivitiesGroupingResource()
.setAlignmentScore(1)
.setFocusScore(0)
.setAdvancedGroups(Arrays.asList(
new ProductivityGroupResource()
.setSectionName("Development")
.setColor("#2196f3")
.setSpentTime(5L),
new ProductivityGroupResource()
.setSectionName("Chat")
.setColor("#E502FA")
.setSpentTime(1L)
))
.setPeriodLong(10L)
.setTotalTrackedTime(7L)
.setIntensityScore(2));
} Для сравнения – как тот же код выглядит без использования приёма:
Читать: https://habr.com/ru/post/577478/?utm_campaign=577478
Static Class, Static Variable, Keyword, and Static Method Examples in Java - Tutorial
What is static in Java
Static in Java is related to class if a field is static means it belongs to the class, similarly static method belongs to classes and you can access both static method and...
Read: http://www.java67.com/2012/11/10-points-about-static-in-java.html
What is static in Java
Static in Java is related to class if a field is static means it belongs to the class, similarly static method belongs to classes and you can access both static method and...
Read: http://www.java67.com/2012/11/10-points-about-static-in-java.html
Advantages and Disadvantages of Encapsulation in Java
The word “Encapsulation” means that closing something like we put the main power of the tablet inside the capsule. It is a mechanism that is done to bind the data and protect it from being used by everyone.
After doing encapsulation, the variables and the data of one class cannot be used in another class and this data can be used by the member functions of the same class. Encapsulation can be achieved by adding the private specifier to the variables.
See the below example of how encapsulation can be done:
public class Encapsulation {
static class Student_Details{
private int roll_no, age ;
private String name ;
public int getroll_no() {
return roll_no ;
}
public int getage() {
return age ;
}
public String getname() {
return name ;
}
public void setroll_no(int student_roll) {
roll_no = student_roll ;
}
public void setage(int student_age) {
age = student_age ;
}
public void setname(String student_name) {
name = student_name ;
}
}
public static void main(String[] args) {
Student_Details myobj = new Student_Details() ;
myobj.setname("Rahul") ;
myobj.setage(18) ;
myobj.setroll_no(34) ;
System.out.println("The name of the student is: "+myobj.getname()) ;
System.out.println("The age of the student is: "+myobj.getage()) ;
System.out.println("The roll no of the student is: "+myobj.getroll_no()) ;
}
Advantages of Encapsulation
* Data Protection: The program runner will not be able to identify or see which methods are present in the code. Therefore he/she doesn’t get any chance to change any specific variable or data and hinder the running of the program.
* Flexibility: The code which is encapsulated looks more cleaner and flexible, and can be changed as per the needs. We can change the code read-only or write-only by getter and setter methods. This also helps in debugging the code if needed.
* Reusability: The methods can be changed and the code is reusable.
Disadvantages of Encapsulation
* Code Size: The length of the code increases drastically in the case of encapsulation as we need to provide all the methods with the specifiers.
* More Instructions: As the size of the code increases, therefore, you need to provide additional instructions for every method.
* Increased code execution: Encapsulation results in an increase in the duration of the program execution. It is because more instructions are added to the code therefore they require more time to execute.
So these were the advantages and disadvantages of encapsulation. Comment down below if you have any queries.
Read: Advantages and Disadvantages of Encapsulation in Java.
The word “Encapsulation” means that closing something like we put the main power of the tablet inside the capsule. It is a mechanism that is done to bind the data and protect it from being used by everyone.
After doing encapsulation, the variables and the data of one class cannot be used in another class and this data can be used by the member functions of the same class. Encapsulation can be achieved by adding the private specifier to the variables.
See the below example of how encapsulation can be done:
public class Encapsulation {
static class Student_Details{
private int roll_no, age ;
private String name ;
public int getroll_no() {
return roll_no ;
}
public int getage() {
return age ;
}
public String getname() {
return name ;
}
public void setroll_no(int student_roll) {
roll_no = student_roll ;
}
public void setage(int student_age) {
age = student_age ;
}
public void setname(String student_name) {
name = student_name ;
}
}
public static void main(String[] args) {
Student_Details myobj = new Student_Details() ;
myobj.setname("Rahul") ;
myobj.setage(18) ;
myobj.setroll_no(34) ;
System.out.println("The name of the student is: "+myobj.getname()) ;
System.out.println("The age of the student is: "+myobj.getage()) ;
System.out.println("The roll no of the student is: "+myobj.getroll_no()) ;
}
Advantages of Encapsulation
* Data Protection: The program runner will not be able to identify or see which methods are present in the code. Therefore he/she doesn’t get any chance to change any specific variable or data and hinder the running of the program.
* Flexibility: The code which is encapsulated looks more cleaner and flexible, and can be changed as per the needs. We can change the code read-only or write-only by getter and setter methods. This also helps in debugging the code if needed.
* Reusability: The methods can be changed and the code is reusable.
Disadvantages of Encapsulation
* Code Size: The length of the code increases drastically in the case of encapsulation as we need to provide all the methods with the specifiers.
* More Instructions: As the size of the code increases, therefore, you need to provide additional instructions for every method.
* Increased code execution: Encapsulation results in an increase in the duration of the program execution. It is because more instructions are added to the code therefore they require more time to execute.
So these were the advantages and disadvantages of encapsulation. Comment down below if you have any queries.
Read: Advantages and Disadvantages of Encapsulation in Java.
The Java Programmer
What are the Various Access Specifiers for Java Classes? - The Java Programmer
There are four types of access specifiers, Access Specifier gives two advantages: Encapsulation and the other is security.