Java is known as an object-oriented programming language (OOPS). The designers created it in a way such that objects become the centre of attention. Java programs create and manipulate objects in an attempt to model how the real world operates.
We can clearly see how fast Java grew in just three years. During this time, Sun also introduced a new terminology to describe Java technology—Java SE (Standard Edition).
In 2014, Oracle Corporation released Java 8 on 18 March, which was another milestone release for the Java ecosystem.
In my previous post, we have already learned how to declare an array, allocate the space for its elements, and how to modify and access its elements. Now we learn how to initialize a java array.
The application discussed in the previous post is based on the asset management classes we have studied so far. We will now look at the concepts of multilevel inheritance with the help of program code.
To understand how the super keyword is used for calling the superclass constructors, let’s add the constructors to our class hierarchy here
Because a static method is invoked without a class instance, we cannot use a this or super reference in the static method.
Suppose we are asked to develop communication software such as an FTP (File Transfer Protocol) or Telnet program that uses a modem.
Let’s recall the rules we learn from previous post about declaring exception in Overriding Methods.
The throw keyword (note the singular form) is used to force an exception.
Sometimes we may find that the exception messages given by the standard exception classes are not intuitive, and it may be necessary to provide more elaborate messages to the application user.
The read method we used in the previous post is in fact defined in the InputStream class. The FileInputStream class that extends from the InputStream class inherits this method.
This is a very convenient class that has the ability to print representations of various data values, such as all primitive types. During printing it converts all characters into bytes using the platform’s default character encoding.
So far we have been using System.out to print messages to the console. Java SE 6 added a Console class to enhance and simplify command-line applications.
A Serializable object may contain references to other objects. We may be wondering if we serialize an object, whether the nested objects are also serialized.
Suppose we want to convert a user-specified weight in pounds to a different unit of measure, such as kilograms, carats, or ounces.
Having seen the built-in simple annotations in the previous posts, it is time now to create our own annotations. Why would we create our own annotations?
In previous post, we have seen how to declare marker and single value annotations. So, let’s continue the same example and learn how to declare multi value annotations and set default values.
But, in this post we learn how to annotate an annotation using few more annotation specifically meant for this purpose.
India’s software development and IT industry is one of the world’s biggest and successful information technology industries.
JAVA was developed by Sun Microsystems and released in 1995. It runs on variety of platform such as Mac OS, Windows, and the various versions of UNIX.
Learn The Effects of Technology on Humans: Social Media in this article
Learn How much time should we spend on your devices every day in this article
Learn about the Best PC games 2023 and features in this article
Learn whether New Technologies Make Us Live Longer in this article
Learn about the NVIDIA project GR00T will bring AI into the real world in this article.
Learn about the Neuralink patient playing chess after chip implant in this article
It is a good practice to provide a coupling between the data and the methods that operate on the data (method is another name for a function or a procedure, also called an operation).
In our example of the previous post, the classes Asset, BankAccount, and SavingsAccount defined two constructors. Both constructors obviously have the
The protected ModifierGoing back to our asset management example, we have defined several classes that lie in a single hierarchy. The Asset, BankAccou
A static block is executed only once when the class is loaded. Our class may contain multiple static blocks. These are executed in the order in which
In my previous post, we have learnt how we can handle multiple exceptions in our code by providing multiple numbers of catch block specific to a particular exception.
We can easily catch and handle errors in our programs so that they do not terminate abnormally. When a program terminates abnormally, typically it dum
Looking at Murphy’s Law, “If anything simply cannot go wrong, it will anyway,” we know that we should always prepare ourself for the worst-case scenario.
In the previous posts, we got an introduction to byte-oriented stream classes, where we used the FileInputStream classFileOutputStream classAs we can
J2SE 5.0 introduced a new feature called autoboxing and unboxing that automatically converts between the primitive data types and their wrapper classes.
One of the major goals of any IDEsuch as NetBeansor Eclipseis to enhance ease of development. The IDE generally provides the boilerplate code for many
It can be used to define final class, final method, final fields and final variable. It can be used in many context in java. Final keyword perform a important role in java programming.
Learn Drone Technology and the Future in this blog
Learn Most Common Data Backup Mistakes in 2020 in this blog
Learn Top blogging tools that make it easier to run my blog in this blog
Learn What is the difference between an IT remote job and working physically in this blog
Learn Positive and negative effects of social media in this blog
Learn The adverse impact of social media we should fight against in this blog
Learn Great things we owe to social media in this blog
Learn The role of social media in education in this blog
Learn Are social media sites productivity killers in this blog
Learn What is Blockchain for Business in this blog