0% found this document useful (0 votes)
2 views1 page

Class : Public : Static

The document outlines fundamental concepts in programming, including data types (int, double, char), keywords (class, public, static), and core programming constructs such as methods, arrays, and control statements. It explains the roles of classes and objects, the Java Development Kit (JDK), and the purpose of constructors. Additionally, it covers method parameters, conditions, and the differences between control statements like break and continue.

Uploaded by

udarasenu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Class : Public : Static

The document outlines fundamental concepts in programming, including data types (int, double, char), keywords (class, public, static), and core programming constructs such as methods, arrays, and control statements. It explains the roles of classes and objects, the Java Development Kit (JDK), and the purpose of constructors. Additionally, it covers method parameters, conditions, and the differences between control statements like break and continue.

Uploaded by

udarasenu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1. *3 Data Types* 9. *What is a Method?

*
- *int*: Stores integers (e.g., 5, -10). - A block of code within a class that performs a
specific task and can be called using an object.
- *double*: Stores floating-point numbers (e.g., 5.5,
-2.3).
- *char*: Stores a single character (e.g., 'a', 'Z'). 10. *Method Parameters*
- Variables passed to a method to provide input data
for that method to use.
2. *3 Keywords*
- *class*: Defines a class.
11. *What is an Array?*
- *public*: Sets access level for classes, methods,
or fields. - A collection of elements of the same data type,
stored in contiguous memory locations.
- *static*: Indicates a method or variable belongs to
the class, not instances.
12. *Switch Case*
3. *What is a Comment?* - A control statement used to execute different code
blocks based on the value of a variable.
- Text in code ignored by the compiler, used to
explain code. Written as // for single line and /* ... */
for multi-line.
13. *Conditions*
- Statements that control the flow of a program
4. *What is a Class?* based on true/false evaluations (e.g., if, else).
- A blueprint for creating objects, defining attributes
and behaviors (methods) of those objects.
Final Keyword: -
The final keyword is used to indicate that a variable,
5. *What is an Object?* method, or class cannot be changed or overridden. It
locks down that part of the code.
- An instance of a class containing properties and
behaviors defined by the class.

Variable type
6. *What is JDK?* • Local
- Java Development Kit; includes tools and libraries • Instance
for developing and running Java programs. • Static

Difference Between Continue and break


7. *What is a Set of Functions?* Break: Exits the loop entirely.
- A collection of methods grouped together, Continue:Skips the current iteration and moves to
typically within a class, to perform specific tasks. the next one.
What new keyword do:
8. *Constructor* Creating Objects. Allocating Memory, Invoking
Constructors
- A special method used to initialize objects when
they are created.

You might also like