overleaf 3

 \documentclass{article}

\usepackage{setspace}

\usepackage[utf8]{inputenc}

\usepackage{fancyhdr}

\usepackage{tocloft}

\pagestyle{fancy}

\fancyhf{}

\fancyhead[L]{\textbf{Java Programming}}

\fancyhead[R]{\textit{name}}

\fancyfoot[L]{^1 Features}

\fancyfoot[C]{\thepage}

\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

\begin{document}

\onehalfspacing

\title{\textbf{Java programming}}

\author{\textit{name}}

\date{July 30 2025}

\maketitle

\newpage

\tableofcontents

\newpage

\textbf{\Large Chapter 1}

\maketitle

\section{\textbf{\LARGE Java Programming}}

In this chapter we will study the data types, features, operators of java programming.

\subsection{Introduction}

Java is a widely used and powerful programming language that offers several unique features and advantages compared to languages like Python and C++. It was developed by James Gosling and his team at Sun Microsystems in the mid-1990s. Java is known for its platform independence, object-oriented structure, and strong memory management, making it a popular choice for building secure, scalable, and cross-platform applications.


\subsubsection{Data types}

\textbf{Numeric datatype:} Numeric data types in Java are used to store numbers, both whole and fractional. They are part of the primitive data types and are divided into two categories: integer types and floating-point types. The integer types include byte, short, int, and long, which are used to store whole numbers of varying sizes. The floating-point types include float and double, which are used to store numbers with decimal points. Among these, int and double are the most commonly used. Choosing the right numeric data type helps manage memory efficiently and improves the performance of Java programs.



\subsubsection{Features of Java programming}

\textbf{Easy to use and read:} Java is designed to be easy to use and understand. Its syntax is clear and similar to other popular languages like C++, which makes learning Java easier for beginners. Java’s code is organized and readable, helping programmers write clean and simple programs. This readability also makes it easier to find and fix mistakes. Because of these qualities, Java is a great choice for new programmers as well as for building large, complex applications.\\


\quad\textbf{Cross platform compatibility:} Since JVMs are available for many platforms, the same Java program can work on Windows, Mac, Linux, and more. This “write once, run anywhere” ability makes Java very flexible and popular for developing applications that need to run on multiple devices.\\


\quad\textbf{Free and open source:} Java is free to download and use, which means anyone can start programming with it without paying a fee. It is also open source, meaning that its source code is available for developers to view, modify, and improve. This openness encourages a large community of developers to contribute to Java’s growth, fix bugs, and create new features. Because of being free and open source, Java is accessible to students, hobbyists, and companies, helping it become one of the most widely used programming languages in the world.\\


\quad\textbf{Portable language:}Java is called a portable language because Java programs can be easily moved from one system to another without any changes. This portability comes from Java’s use of bytecode, which is the same on every platform and runs on the Java Virtual Machine (JVM). 


\subsubsection{Operators}

perators in Java are special symbols or keywords that perform operations on variables and values. They are used to perform arithmetic calculations, compare values, combine conditions, and manipulate data.\\


\textbf{Arithmetic Operator}\\

Arithmetic operators used between two operands for a particular operation. There are many arithmetic operators. It includes the exponent (**) operator as well as the + (addition), - (subtraction), * (multiplication), / (division), \%(reminder), and // (floor division) operations.


\textbf{Comparison Operator}\\

Comparison operators mainly use for comparison purposes. Comparison operators compare the value of the two operands and return a true or false Boolean value in accordance. The example of comparison operators are ==, !=, . In the below table, we explain the word of the operators.\\


\textbf{Assignment operator}

Using the assignment operators, the right expression's value is assigned to the left operand. There are some example of assignment operators like =, +=, -=, *=, =, **=, //=. In the below table, we explain the works of the operators.\\


\textbf{Bitwise Operator}

The two operands' Values are processed bit by the bitwise operators. The examples of Bitwise operators are bitwise OR (-), bitwise AND (\&), bitwise XOR, negation, Left shift, and Right shift.\\


\textbf{Logical Operator}

The assessment of expressions to make decision typically uses logical operators. The examples of logical operators are and, or, and not. In the case of logical AND, if the first one is 0, it does not depend upon the second one. In the case of logical OR, if the first one is 1, it does not depend on the second one. Java supports the following logical operations. In the below table, we explain the works of the logical operators.


\end{document}

Comments

Popular posts from this blog

overleaf 1

overleaf 6

overleaf 2