Nothing here yet.
Nothing here yet.
Your example for Pass by Reference section is wrong because the second println will print 10, not 20. In Java we always pass values, never references, at least not in the same sense as in languages like C++ or C#. In Java there are 2 kinds of values: primitive values and reference values. When you pass an object as an argument, you are passing a reference value. And changing the value of a reference type variable inside a method does not change the value of the variable outside. But changing the state of a reference is not the same thing as changing the value of a variable.
Nice! I like to use the Files utility class, look: import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void main (String... args) throws IOException { final Path path = Paths.get(System.getProperty( "user.dir" ), "Report.html" ); if (Files.notExists(path)) Files.createFile(path); } }
Hi, nice article! To avoid to call setTimeout() function inside your ngOnInit() method, you can to use the ngAfterViewInit() method. ngAfterViewInit() { this .dataSource.sort = this .sort; this .dataSource.sortingDataAccessor = (item, property) => { return item[property].toLocaleLowerCase(); }; } According to documentation , Angular guarantees that your @ViewChild will be set before ngAfterViewInit() is called.
Nice article! I disagree with this statement: This paradigm is based around defining “Classes” which will initialize “objects” OO is about objects, not classes. There are ways to implement OO without using classes and JavaScript is a great example. JavaScript, as described by ECMAscript specification , is an: ... object-oriented programming language for performing computations and manipulating computational objects within a host environment. However, objects are not created by class instancing . Even though ECMAScript includes syntax for class definitions, ECMAScript objects are not fundamentally class-based such as those in C++, Smalltalk, or Java.
Nice article! In my opinion the best way to manage Java versions is using the scoop.sh tool. With Scoop you must to add de Java bucket and then install any version you want, as explained here: https://github.com/lukesampson/scoop/wiki/Java You can use sdkman.io but will need to install WSL, Cygwin or other tool like Git Bash for Windows.
Hi, Thanks for the article. Just some words: About Android and Java Dalvik was replaced by ART. https://source.android.com/devices/tech/dalvik Dalvik and ART are not (and not contains) Java Virtual Machines. Indeed they are completely different and independent virtual machines. The JVM runs Java bytecode in the class format: https://docs.oracle.com/javase/specs/jvms/se15/html/jvms-2.html#jvms-2.1 The Dalvik/ART runs Dalvik bytecode in the dex format: https://source.android.com/devices/tech/dalvik/dalvik-bytecode https://source.android.com/devices/tech/dalvik/dex-format In Android app build system, the Java source code is compiled in Java bytecode by OpenJDK javac . So the Java bytecode is compiled to Dalvik bytecode by d8 . Dalvik and ART knows nothing about Java bytecode. The fight Oracle vs Google is not about JVM or JDK, the fight is about the API use, you can understand better on this page: https://www.leagle.com/decision/infdco20120601k39 About modernizing JVM The JVM is a specification. Anyone can create your implementation of JVM. Oracle does not prohibit. Some examples of JVM implementations besides Hotspot: https://www.eclipse.org/openj9/ https://www.azul.com/products/zing/ About JDK The JDK, or Oracle JDK, is a proprietary implementation of Java Platform Standard Edition. The OpenJDK is the free-software reference implementation of Java Platform Standard Edition. https://openjdk.java.net/ Oracle JDK and OpenJDK are almost identical nowadays. This article explains better: https://blogs.oracle.com/java-platform-group/oracle-jdk-releases-for-java-11-and-later The OpenJDK is not only for Linux, is for many platforms. The OpenJDK is provided just as source code, so many vendors build the OpenJDK and provides as binary packages. Some vendor provides installers too. (Community) https://adoptopenjdk.net/ (Azul) https://www.azul.com/downloads/zulu-community (Amazon) https://aws.amazon.com/corretto/ (Oracle) https://jdk.java.net/15/ Java SE has new releases each 6 months, it's evolution improved and speedup very much since Java 11.