Skip to main content

Posts

JAVA unit 2 DATA TYPES AND VARIABLES

  Data Types A data type defines the kind of data a variable can store, the operations that can be performed on it, and the amount of memory allocated. Java Primitive Data Types Data Type Size Range (Approx.) Example Byte 1 byte -128 to 127 byte a = 100; short 2 bytes -32,768 to 32,767 short s = 1000; Int 4 bytes -2,147,483,648 to 2,147,483,647 int num = 50000; Long 8 bytes -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 long l = 100000L; float 4 bytes ~6–7 decimal digits float f = 5.75f; double 8 bytes ~15 decimal digits double d = 19.99; Char 2 bytes Single Unicode character char c = 'A'; boolean 1 bit* true or false boolean flag = true; *Boolean size is JVM-dependent (commonly 1 byte in memory, but logically 1 bit).   Java Non-Primitive Data Types Type Description Example String Sequence of characters String name = "Dinesh"; Array Collection of elements int[] arr = {1, 2, 3}; Class Blueprint for objects class Car { } Object Instance of a class Car myCar = ...
Recent posts

Unit-1 Java Fundamental

1.1 Introduction to Java Java is a high-level, object-oriented, general-purpose programming language developed by Sun Microsystems. It is simple, efficient, and platform-independent. Java was originally designed for embedded network applications running on multiple platforms. It is a portable, object-oriented, and interpreted language.  History of Java James Gosling (known as the Father of Java), Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. This small team of Sun Microsystems engineers was called the Green Team . Initially, Java was designed for small embedded systems and electronic appliances such as set-top boxes. The language was first called Greentalk by James Gosling, and its file extension was .gt . Later, it was renamed Oak and was developed as part of the Green Project. The oak tree symbolizes strength and is the national tree of several countries, including the United States, France, Germany, and Romania. In 1995, Oak was renamed ...

Introduction to Software Engineering (Class 12)

 Introduction to Software Engineering Software engineering is the branch of computer science that deals with the design, development, testing, and maintenance of software applications. Software engineers apply engineering principles and knowledge of programming languages to build software solutions for end users. IEEE, in its standard 610.12-1990, defines software engineering as the application of a systematic, disciplined, which is a computable approach for the development, operation, and maintenance of software. Boehm defines software engineering, which involves, ‘the practical application of scientific knowledge to the creative design and building of computer programs. It also includes associated documentation needed for developing, operating, and maintaining them.’ Importance of Software Engineering Reduces complexity Large software systems are divided into smaller, manageable modules. Each module is developed and solved independently, ...

Unit 1 Introduction to operating System (CLASS 11)

Introduce Operating System An Operating System (OS) is system software that acts as an interface between the computer hardware and the user. It manages computer resources and provides services for programs to run efficiently. Examples of popular operating systems include: Microsoft Windows Linux macOS Android iOS   Function of OS 1. Process Management The operating system helps in running many programs at the same time. It keeps track of each running program (called a process), decides which one should run next, and stops or starts them as needed. It makes sure that all the programs get a fair chance to use the CPU.   2. Memory Management The OS manages the computer's memory (RAM). It decides which program will use how much memory and keeps track of it. When a program is closed, it frees up the memory so that other programs can use it. This helps the computer run smoothly without crashing.   3. File System Management The operating system helps us to creat...

Class 12

Operators in C# In C#, operators are  symbols that perform operations on variables and values, forming the basis of expressions and enabling various computations and comparisons .   1. Arithmetic Operators Arithmetic operators are used to perform mathematical operations such as addition, subtraction, multiplication, and division. Operator Name What It Does Example + Addition Adds two numbers a + b - Subtraction Subtracts one number from another a - b * Multiplication Multiplies two numbers a * b / Division Divides one number by another a / b % Modulus Gives the remainder of division a % b Use: For doing calculations like total marks, average, or price after discount.     2. Comparison (Re...