most important keywords in Java:
public
: A keyword used to indicate that a method or variable can be accessed from anywhere.
private
: A keyword used to indicate that a method or variable can only be accessed within the same class.
protected
: A keyword used to indicate that a method or variable can be accessed within the same package or by a subclass in a different package.
static
: A keyword used to indicate that a method or variable belongs to the class and not to any instance of the class.
final
: A keyword used to indicate that a variable or method cannot be changed or overridden.
abstract
: A keyword used to indicate that a method or class is incomplete and must be implemented by a subclass.
interface
: A keyword used to define a collection of abstract methods and constants that can be implemented by a class.
class
: A keyword used to define a blueprint for creating objects that contain variables and methods.
extends
: A keyword used to create a subclass that inherits the properties and methods of the parent class.
implements
: A keyword used to indicate that a class is implementing an interface and must provide implementation for all of its abstract methods.
this
: A keyword used to refer to the current object.
super
: A keyword used to refer to the parent class of the current object.
try
, catch
, finally
: Keywords used to handle exceptions in Java.
void
: A keyword used to indicate that a method does not return any value.
return
: A keyword used to return a value from a method.
Australia
UK
UAE
Singapore
Canada
New
Zealand
Malaysia
USA
India
South
Africa
Ireland
Saudi
Arab
Qatar
Kuwait
Hongkong
Copyright 2016-2023 www.programmingshark.com - All Rights Reserved.
Disclaimer : Any type of help and guidance service given by us is just for reference purpose. We never ask any of our clients to submit our solution guide as it is, anywhere.