Чашечка Java
رفتن به کانال در Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
نمایش بیشتر8 295
مشترکین
+324 ساعت
+127 روز
-4930 روز
آرشیو پست ها
8 291
Java News Roundup: State of Project Valhalla by Brian Goetz, GlassFish 7.0-M1 and Project Loom Lab
It was very quiet for the week of December 27th, 2021, but InfoQ found a few news items of interest that include: the “State of Project Valhalla,” a three-part blog series written by Brian Goetz; GlassFish 7.0.0-M1; Project Loom Lab, a new project created by Nicolai Parlog; an update of the Jakarta EE Tutorial to Jakarta EE 9.1; Apache Camel 3.11.5; and JDKMon 17.0.21.
By Michael Redlich
Read: https://www.infoq.com/news/2022/01/java-news-roundup-dec27-2021/
03 ژانویه 2022, 01:45
8 291
10 Tools Java Developers Should Learn in 2022 - (UPDATED)
Hello folks, we are in the first week of 2022, and many programmers have already started making a good process to their goals for 2022, which is very good, but if you are someone, who is still not...
Read: http://www.java67.com/2018/04/10-tools-java-developers-should-learn.html
02 ژانویه 2022, 23:02
8 291
LJV: Чему нас может научить визуализация структур данных в Java
Эта статья является пересказом моего доклада на Java-конференции SnowOne 2021 года. LJV — проект, созданный в 2004 году как инструмент для преподавания языка Java студентам. Он позволяет визуализировать внутреннее устройство структур данных. В этом докладе я запускаю LJV на разных структурах (от
Stringдо ConcurrentSkipListMap) в разных версиях Java и разбираю, что там внутри, как оно менялось от версии к версии, и как это всё работает.
Читать: https://habr.com/ru/post/599045/?utm_campaign=59904502 ژانویه 2022, 04:01
8 291
«Невозможный» параллельный алгоритм неотрицательной суммы
Рецепт параллельных вычислений Fork/Join или Map/Reduce:
- разбить задачу на куски;
- посчитать куски по-отдельности;
- склеить вместе.
Неотрицательная сумма
(a, b) -> max(0, a + b)неассоциативна и результат зависит от порядка склейки. Она сломает Fork/Join и результат будет некорректен. Магией моноида починить на Java, SQL и Haskell за 5 минут, но
сломать мозг
Читать: https://habr.com/ru/post/598913/?utm_campaign=59891302 ژانویه 2022, 02:04
8 291
Top Java Blogs Weekly: Best of 2/2022
Best of Top Java Blogs, year 2022, week 2
Read: https://www.topjavablogs.com/news/best-of-2-2022
02 ژانویه 2022, 01:54
8 291
Top 5 Courses to learn Design Patterns in Java
Hello Java programmers, if you want to learn Design patterns in 2022 and looking for the best resources like books, tutorials, and online courses then you have come to the right place. Earlier, I...
Read: http://www.java67.com/2022/01/top-5-courses-to-learn-design-patterns.html
02 ژانویه 2022, 00:10
8 291
Top 5 Spring Certification Books and Courses for Java Developers in 2022 - Best of Lot
If you are preparing for Spring Professional certification (VMware EDU-1202) and looking for the best books, online courses, and practice tests for your preparation then you have come to the right...
Read: http://www.java67.com/2017/07/3-spring-certification-books-best-of.html
31 دسامبر 2021, 23:55
8 291
Java: делаем Valhalla сами
Сказ о том как сделать свой List<?, который будет быстрее ArrayList и занимать меньше памяти.
Читать: https://habr.com/ru/post/599003/?utm_campaign=599003
31 دسامبر 2021, 15:04
8 291
Google Protocol Buffers Support Idiomatic Kotlin Bindings
Google added support for Kotlin to its open source Protocol Buffers project, which is able to translate a proto definition into an idiomatic Domain Specific Language (DSL) leveraging Kotlin advanced syntax features.
By Sergio De Simone
Read: https://www.infoq.com/news/2021/12/protocol-buffers-kotlin-dsl/
31 دسامبر 2021, 06:12
8 291
Pluralsight membership vs. Coursera Plus Subscription? Which is better for Developers?
Online learning is probably the best and most innovative idea in this age because it allows people worldwide to access content and learn new skills from your home and on your schedule and even...
Read: http://www.java67.com/2021/12/pluralsight-membership-vs-coursera-plus.html
31 دسامبر 2021, 05:13
8 291
Top 5 courses to learn Blockchain technology in 2022 - Best of Lot
Hello guys, If you're involved in the cryptocurrency space, then you've probably heard about Blockchain. Unless you're living under a rock…
I'm talking about this new technology...
Read: http://www.java67.com/2021/12/top-5-courses-to-learn-blockchain.html
30 دسامبر 2021, 22:38
8 291
Top 5 JavaScript Data Structure and Algorithm Courses for Beginners to Learn in 2022 - Best of Lot
Hello guys, if you are a JavaScript developer learning Data Structure and Algorithms and looking for the best online course to learn Algorithms and Data Structure in JavaScript, then you have come to...
Read: http://www.java67.com/2020/09/top-5-courses-to-learn-data-structures-algorithms-in-javascript.html
30 دسامبر 2021, 22:37
31 دسامبر 2021, ~05:30
8 291
Top 5 Design Patterns Books for Java Developers - Best of Lot
Design patterns are an essential topic for object-oriented programmers, like Java and C++ developers. It becomes even more important as your experience grows because everybody starts expecting a lot...
Read: http://www.java67.com/2016/10/top-5-object-oriented-analysis-and-design-patterns-book-java.html
30 دسامبر 2021, 09:48
8 291
Создание Native Images со Spring Native и GraalVM
В этой статье я хочу исследовать возможности технологии Java Native Image, поделиться опытом взаимодействия с ней и со средствами Spring для генерации нативных образов.
Читать: https://habr.com/ru/post/598753/?utm_campaign=598753
30 دسامبر 2021, 03:03
8 291
Top 5 Free & Paid Spring Certification Courses and Practice Tests
Many Java developers don't know that, similar to Oracle's Java certification, there is also a Spring certification program, which certifies yourself for your Spring framework skill. There are...
Read: http://www.java67.com/2017/08/3-free-spring-certification-mock-exams-practice-questions.html
29 دسامبر 2021, 23:51
8 291
Top 5 Web Development Courses for Beginners to Learn Online in 2022 - Best of Lot
Hello guys, web development is one of the most lucrative fields of Software development, and demand for web developers is always increasing. It's also one of the exciting fields as you create...
Read: http://www.java67.com/2021/11/top-5-web-development-courses-for.html
29 دسامبر 2021, 09:59
29 دسامبر 2021, ~10:00
8 291
e3 {
public static void main(String[] args) {
MethodOverloading obj=new MethodOverloading();
obj.blogdetails(1000, "The number of People who have checked this blog are ");
obj.blogdetails( "The number of People who have checked this blog are ",1000);
}
}
Output:
The number of People who have checked this blog are 1000
The number of People who have checked this blog are 1000
Code Explanation:
We have taken two classes in the above code. The first-class name is MethodOverloading and another one is Example3 which is containing the main method.
In the MethodOverloading class, we have created two functions with blogdetails as their names and void as return type but the sequence of the parameters are different.
In the Example3 class, we have defined the main method and inside it, we have created an object of MethodOverloading class. This object is calling both the functions one by one and checks whether they are executing correctly or not.
Conclusion
Method Overloading in java can help you align your code in a much better way. You can also remember that overloading of the main method is possible in java. I hope you were able to understand this blog thoroughly. Please feel free to comment with your doubts.
Read: Method Overloading in Java With Example.
29 دسامبر 2021, 03:36
29 دسامبر 2021, ~03:58
8 291
Method Overloading in Java With Example
Method overloading states that we can have methods with the same name but something in their parameters should be different. If you know about constructor overloading then it is pretty similar to method overloading.
Method overloading helps us from writing the same methods under different names. For example, a method involving multiplication of 2 numbers can be named as mymultiplication(int x, int y) and the method involving multiplication of 3 numbers can have the same name with different parameters as mymultiplication(int x, int y, int z).
If method overloading would not be supported in java then we needed to create different names of methods with a different number of parameters. Taking the above example only will result in mymultiplication(int x, int y) and mymultiplication1(int x, int y, int z) methods. This can be a little confusing while understanding another person’s program.
Ways to Achieve Method Overloading in Java
1. By Changing the Number of Parameters
class MethodOverloading{
int multiply(int x,int y) {
int res=x*y;
return res;
}
// Overloaded method with an extra parameter
int multiply(int x,int y,int z) {
int res=x*y*z;
return res;
}
}
public class Example1 {
public static void main(String[] args) {
MethodOverloading obj=new MethodOverloading();
int res_two_numbers=obj.multiply(4, 5);
int res_three_numbers=obj.multiply(2, 2,3);
System.out.println("The result of multiplication between 4 and 5 is "+res_two_numbers);
System.out.println("The result of multiplication between 2, 2 and 3 is "+res_three_numbers);
}
}
Output:
The result of multiplication between 4 and 5 is 20
The result of multiplication between 2, 2 and 3 is 12
Code Explanation:
We have taken two classes in the above code. The first-class name is MethodOverloading and another one is Example1 which is containing the main method.
In the MethodOverloading class, we have created two functions with multiply as their names and integer as return type but with different parameters. This process is known as Method Overloading in Java.
In the Example1 class, we have defined the main method and inside it, we have created an object of MethodOverloading class. This object is calling both the functions one by one and checks whether they are executing correctly or not.
2. By Changing Datatype of Parameters
class MethodOverloading{
void totalmarks(int x,int y) {
int res=x+y;
System.out.println("The total marks of the student is "+res);
}
// Overloaded method with change in datatype of parameters
void totalmarks(double x,double y) {
double res=x+y;
System.out.println("The total marks of the student is "+res);
}
}
public class Example2 {
public static void main(String[] args) {
MethodOverloading obj=new MethodOverloading();
obj.totalmarks(45, 20);
obj.totalmarks(55.6, 25.8);
}
}
Output:
The total marks of the student is 65
The total marks of the student is 81.4
Code Explanation:
We have taken two classes in the above code. The first-class name is MethodOverloading and another one is Example2 which is containing the main method.
In the MethodOverloading class, we have created two functions with totalmarks as their names and void as return type but the data types of the parameters are different.
In the Example2 class, we have defined the main method and inside it, we have created an object of MethodOverloading class. This object is calling both the functions one by one and checks whether they are executing correctly or not.
3. By Changing Sequence of Parameters
class MethodOverloading{
void blogdetails(int x,String s) {
System.out.println(s+x);
}
// Overloaded method with change in order of parameters
void blogdetails(String s, int x) {
System.out.println(s+x);
}
}
public class Exampl[...]
29 دسامبر 2021, 03:36
29 دسامبر 2021, ~03:58
8 291
10 Best Web Development Courses and Projects on Coursera Plus to Join in 2022
Hello guys, if you are looking for the best web development courses and projects on Coursera to join in 2022, then you have come to the right place. Earlier, I have shared the best Coursera...
Read: http://www.java67.com/2021/12/best-coursera-plus-courses-for-web-development.html
29 دسامبر 2021, 02:33
29 دسامبر 2021, ~02:45
8 291
End Of Year Learnings From Minecraft’s Migration To JDK 16 And Q&A With The Mojang Team
In an effort to obtain a smoother transition towards JDK 17, Minecraft decided to upgrade to JDK 16 first just months before Java's LTS release in September 2021. The changes point towards possible performance gains just by running JDK 17 out-of-the-box. InfoQ reached out to the Mojang team for further questions on their experience running JDK 16 in production.
By Olimpiu Pop
Read: https://www.infoq.com/news/2021/12/minecrafts-jdk16-migration/
29 دسامبر 2021, 01:41
