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

Java Notes

This document provides an overview of Java programming, covering its key features, the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK). It explains the basic structure of a Java program, data types, operators, input handling, and conditional statements, including if-else and switch-case. Additionally, it includes practice questions ranging from basic to advanced levels to reinforce learning.

Uploaded by

Tanish Kollepara
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

Java Notes

This document provides an overview of Java programming, covering its key features, the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK). It explains the basic structure of a Java program, data types, operators, input handling, and conditional statements, including if-else and switch-case. Additionally, it includes practice questions ranging from basic to advanced levels to reinforce learning.

Uploaded by

Tanish Kollepara
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

Java Notes: Basics to Conditional Statements 1.

Introduction to Java Java is a high-level,


object-oriented, platform-independent programming language. Key features: Simple, Secure, Portable,
Object-Oriented, Robust, Multithreaded. 2. JVM, JRE, JDK JVM: Java Virtual Machine – runs Java
bytecode. JRE: Java Runtime Environment – JVM + libraries. JDK: Java Development Kit – JRE +
tools for development (compiler, debugger). 3. Basic Structure of a Java Program A simple program:
class Main { public static void main(String[] args) { [Link]("Hello World"); } } 4. Variables
and Data Types Primitive types: int, float, double, char, boolean, byte, short, long. Non-primitive
types: String, arrays, classes, objects. 5. Operators Arithmetic: +, -, *, /, % Relational: ==, !=, >, <,
>=, <= Logical: &&, ||, ! Assignment: =, +=, -= 6. Input in Java import [Link]; Scanner sc =
new Scanner([Link]); int x = [Link](); 7. Conditional Statements If Statement: if (condition) { //
code } If-else Statement: if (condition) { } else { } Else-if Ladder: if (...) { } else if (...) { } else { } Switch
Statement: switch(value) { case 1: break; default: } Practice Questions (Basic → Advanced) Basic Print
your name. Add two numbers. Check if number is even or odd. Find largest of two numbers.
Intermediate Find largest of three numbers. Check if a character is vowel or consonant. Write a simple
calculator using switch-case. Check if a number is positive, negative, or zero. Advanced Find the roots
of a quadratic equation. Menu-driven program: ATM operations. Grade calculator based on marks
using else-if ladder. Electricity bill calculator using conditional statements.

You might also like