coderz.py

Keep Coding Keep Cheering!

static keyword in C++

When the static keyword is used, variable or data members or functions can no longer be changed. It is allocated for the lifetime of the program. The static keyword can be used with: Static Variables: Variables in a function, Variables in a class Static Members of Class: Class objects and Functions in a class Static Variables in […]

October 14, 2022 | C++ | No comments

Storage classes in C++

Storage classes in C++ are type specifiers that aid in defining the lifetime and visibility of variables and functions within a C++ program. C++ storage classes aid in determining the existence of a specific variable or function during the execution of a program. Syntax:  Types of storage classes: Five different kinds of storage classes can […]

October 1, 2022 | C++ | No comments

Nested Class in Java

It is possible to define a class within another class in Java, and these classes are referred to as nested classes. They allow you to logically group classes that are only used in one place, increasing encapsulation and making code more readable and maintainable. Syntax: Note: The scope of the enclosing class limits a nested […]

June 11, 2022 | Java | No comments

Sub packages in Java

The subpackage is a package within a package. It should be developed to further categorize the package. Sub packages are identical to packages, with the exception that they are defined within other packages. Sub packages are similar to subdirectories, which are directories within directories. Sub packages in themselves are packages, so you have to use/access […]

June 3, 2022 | Java | No comments

Static keyword in Java

In Java, the static keyword is mostly used to control memory. It is also used to share a class’s identical variable or method. Static keywords can be used with variables, methods, blocks, and nested classes. The static keyword refers to a class rather than a specific instance of that class. A constant variable or a […]

May 28, 2022 | Java | No comments

Non-access modifiers

Non-access modifiers provide the JVM with information about a class, method, or variable’s characteristics. In Java, there are seven different types of Non-Access modifiers: static final abstract synchronized volatile transient native Static: The static keyword indicates that the entity to which it is applied is accessible from any instance of the class. The static keyword […]

May 17, 2022 | Java | No comments

Advertisement