1 Million+
Questions
50k +
Active Users
24hrs max.
Answering Time
Void is a keyword and used to specify that a method doesn’t return anything. As method doesn’t return anything, its return type is void . As soon as the method terminates, the java program terminates too. Hence, it doesn’t make any sense to return from method as JVM can’t do
Static is a keywordwhich is when associated with a method, makes it a class related method. The method is static so that JVM can invoke it without instantiating the class. This also saves the unnecessary wastage of memory which would have been used by the object declared only for calling
Hello,
Because Java compiles as bytecode which then runs inside a Virtual machine, it cannot access the computer it runs on like a natively compiled program can. The general reason why Java is considered to be more secure than, say C, is because it handles memory management for you.
Thank
Hello aspirant
In Java programming language, a keyword is any one of 61 reserved words that have a predefined meaning in the language.Due to this programmers can not use keywords as names of variables, methods,classes or as any other identifier.
Of these 61 words ,49 words are in use, 1
Suppose you have to perform addition of the given numbers but there can be any number of arguments, if you write the method such as a(int,int) for two parameters, and b(int,int,int) for three parameters then it may be difficult for you as well as other programmers to understand the behavior
If a subclass provides the specific implementation of the method that has been declared by one of its parent class, it is known as method overriding.
The final keyword can be applied with the variables, a final variable that have no value it is called blank final variable or uninitialized final variable. It can be initialized in the constructor only. The blank final variable can be static also which will be initialized in the static block
In Java, Abstraction is defined as the process of reducing the object to its essence so that only the necessary characteristics are exposed to the users. Abstraction defines an object in terms of its properties, behavior, and interfaces.
Ex: A bike is viewed as a bike rather than its
There are two types of polymorphism in Java: compile-time polymorphism and runtime polymorphism. We can perform polymorphism in java by method overloading and method overriding.
If you overload a static method in Java, it is the example of compile time polymorphism. Here, we will focus on runtime polymorphism in java.
The Question containing Inaapropriate or Abusive Words
Question lacks the basic details making it difficult to answer
Topic Tagged to the Question are not relevant to Question
Question drives traffic to external sites for promotional or commercial purposes
The Question is not relevant to User
And never miss an important update