afaq

Memory

Computer memory is the storage space in the computer,where data is to be processed and instructions required for processing are stored. The memory is divided into large number of small parts called cells. Each location or cell has a unique address, which varies from zero to memory size minus one.

Java break and continue

Java break is keyword which is used to going out from “switch” and loops(while, do-while, for). Java continue is also a keyword which is used to going to next condition in loops(while, do-while, for) and going to next case in switch.

Java for

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The for executes a block of code as long as a given condition is true. It has multiple statements. This is very popular in all loops.

Java do while

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The do – while executes a block of code as long as a given condition is true.

Java while

When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The while executes a block of code as long as a given condition is true.

Java switch

Java switch statement is used to select one of many code blocks to be executed. How to Java switch works:

Matching each expression with case
Once it match, execute all case from where it matched.
Use break to exit from switch
Use default when expression does not match with any case

Java if else

if Statement Use the if statement to specify a block of Java code to be executed if a condition is true. if (condition) { // block of code to be executed if the condition is true } Sample program with if Write a program or WAP to find a number is greater or not. class […]

Java Comments

Java Comments can be used to help for description the code. It will never show on run time. Single-line comments It starts with two forward slashes (//). Java Multi-line Comments. More than one line comments start with /* and ends with */.

Java Type Casting or Type Conversion

Type casting is when you assign a value of one primitive data type to another type. In Java, there are two types of casting:
Widening Casting (automatically) – converting a smaller type to a larger type size

History of Computer

Babbage’s Analytic Engine (Charles Babbage)-1833

Mechanical, digital, genral purpose
Was crank-driven
Could store instruction
Could perform mathatical calculation
Had ability to print
Store data with Punch Card

1 32 33 34 35 36