Core Java: An Integrated Approach: Covers Concepts, programs and Interview Questions w/CD. Front Cover. R. Nageswara Rao/kogent Solutions. Dreamtech. Core Java: An Integrated Approach: Covers Concepts, programs and Interview By R. Nageswara Rao/kogent Solutions. Core Java: An Integrated Approach - Kindle edition by Kogent Solutions Inc. R. Nageswara Rao. Download it once and read it on your Kindle device, PC.

Core Java By Nageswara Rao Ebook

Language:English, French, Dutch
Genre:Politics & Laws
Published (Last):02.06.2016
ePub File Size:28.32 MB
PDF File Size:18.17 MB
Distribution:Free* [*Registration Required]
Uploaded by: DELORA

Check these links: Core Java An Integrated Approach Covers Concepts, Programs And Interview: Free Download, Borrow, and Streaming. Core Java kaz-news.infoara Rao - Download as PDF File .pdf), Text File .txt) or read online. Core Java – An Integrated Approach covers all core concepts in a methodical way. Dr. R. Nageswara Rao has been associated with teaching Computer.

This book is not yet featured on Listopia. Community Reviews. Showing Rating details. More filters. Sort order. Sep 19, Delhi Irc added it Shelves: Sep 24, Dave added it. Ajeet Kr rated it did not like it Sep 10, Vibhuti rated it it was amazing Dec 22, Iyappan rated it liked it Mar 20, Vanshika rated it it was amazing Feb 25, Aradhya rated it it was amazing Jul 19, Subhrajeet Mishra rated it it was amazing Mar 07, Sathwik Tummala rated it it was amazing Aug 20, Nidhi rated it did not like it Sep 07, Lakshmi Ganesh rated it really liked it Jun 05, Dolly rated it liked it Jan 18, Anmol Dhall rated it it was amazing Mar 24, Harini Chandrasekar rated it liked it May 12, Dec 27, Amrit Das added it.

Himanjan Bora rated it really liked it Jul 10, Jaya rated it it was amazing Nov 08, Com rated it liked it Aug 14, Naman Porwal rated it it was amazing Aug 17, Kumar rated it it was amazing Aug 14, Prakash rated it it was amazing Apr 14, Sulochana Sharma rated it really liked it Jan 06, Rahul rated it it was amazing Sep 17, Com rated it it was amazing Aug 14, Akanksha Jaswal rated it it was ok Oct 22, Agesh Chowdary rated it really liked it Jul 10, May 27, Aastha Shreya marked it as to-read.

Anupamkumar A Meti rated it liked it Nov 22, Shiva rated it it was amazing Jan 10, Shivam Singh rated it it was amazing Jan 13, There are no discussion topics on this book yet. Readers also enjoyed. Heap Memory: Object are created in the heap memory, here we can create any no. Heap memory is a huge memory block in JVM.

Core Java: An Integrated Approach: Covers Concepts, programs and Interview

Java Stacks: These are the memory areas where java methods are executed. PC registers Program Counters: These registers store the memory address of the next machine code instructions to be executed by the microprocessors. Native Method Area: We can create several processors in java, called threads this is an essential feature to design server side programs. We can develop programs in java which dynamically interact with the user on internet Ex: A comment represents description about the features of programs.

These are non-executable statements by the JVM. The advantage of writing comments is to increase readability and understandability of executable statements in the program by the programmer. There are three types of comments 1. Single Line comments Ex: Multi Line comments Ex: What is API Document? API Application Programming Interface documentation is a file that contains discretion of all the features of softwares, a product, or a Technology.

API Document is created by using the java doc compiler. Sava the java program as First. Main Method is entry point to JVM to start execution of a java program. A parameter is a variable to receive data from outside, so String arg [] is a main method parameters. JVM wants a main method argument as Sstring from only. The data or values passed to any method. To call a method in java there are two ways: Then call method using object Obj. A static method is a method that can be called without using any object.

About It is available to outside programs or JVM. Here out is a Static Variable in System class.

Upcoming Events

Here in is a Static Variable in System class. To Execute the First. Print -: Display the output and then keeps the cursor in the same line. Pritln -: Display the output and then throws the cursor in the next line. These both the methods are belong to the Printstream class. Naming conventions: Java is a case sensitive language.

The rules to be followed by the programmers by writing class name, method name, and variable declaration etc. There are six rules in the java naming conventions Package Names in java are written in all small letters.

Method Names start with a small letters, then each word start with capital letters. Variable also fallows the method Naming convention rule i. Method name rules Ex: Constant variable name should be written using all capital letters Ex: BOLD 6. All Key words should be written in all small latters Ex: It contains or consists of wrapper classes, String, Threads etc. Wrapper Classes: These are the classes useful to convert ordinary classes to objects Threads: Executing the classes is called a thread.

We can read or write the java package using this package. It consists of important sub-packages like java. A Server is a machine that provides services to other computers in a network. Using java. An applet is dynamically interactive programs Applets are client side programs. There are five data type as follows 1. Integer Data Types: These data types represent numbers without decimal point like 10, , , 0 etc.

Float Data Type: Single Point These data types represent numbers with decimal point like Data Types float Single precision double double precision Ex: Character Data Type: Data Types Char Ex: What is Unicode System? A bit character set standard, designed to include characters appearing in most languages including Chinese, Japanese, etc.

Unicode is a standard to include alphabets from all human languages into java. Unicode system uses 2 bytes of memory to represents a single character. String Data Type: Boolean Data Type: This data type represents two values, either true or false or binary values like 1 or 0. ASCII -: American Standard Code for Information Interchange A code for information exchange between computers made by different companies; A string of 7 binary digits represents each character; used in most microcomputers.

Operators An operator is a symbol that can perform an operation on operands variable ; Operators are convenient to program or to do convenient to do programming. If an operator acts on a single variable Operand then it is called as Unary operator.

If an operator acts on a two variables Operands then it is called as Binary operator. If an operator acts on a three variables Operands then it is called as ternary operator. There are twelve Operators as follows 1. Membership or. Dot Operators Instanceof Operators New Operators Arithmetic Operators: These operators performs basic arithmetic operations etc. Unary Operators: This operator negates the value of variable.

This operator is increases the value of variable by 1. In Pre Increment.

Increment is done first, and then all other operations are done later. In Post Increment. All other operations are done first; and then increment is done at the end. This operator is decreases the value of variable by 1.

In Pre Decrement. Decrement is done first, and then all other operations are done later. In Post Decrement. All other operations are done first; and then Decrement is done at the end. Unary Minus -: This operator is changes the sign value of variable. Assignment Operators: This operators store a value into a variable. Relational Operators: These operators are supports to compare two quantities; they are used in construction of simple conditions.

Logical Operators: These operators are used to construction to compound conditions. Boolean Operators: Bitwise Operators: These operators are used for testing, complementing or shifting bits to the right or left. A list of seven Bitwise operators as follows 1. Bitwise OR 4. This operator performs ANDing operation on individual bits of numbers. Truth Table: It gives the relations between input bits to output bits. This operator performs ORing operation on individual bits of numbers.

Conditional Operators: The conditional operator consist of two symbols? It acts upon three variables so it is called ternary Operators. Dot Operators: This operator represents the membership. Dot operator can use as follows To refer to class and interfaces of a packages. Class Ex: BufferedReader; To refer to variable of a class. To refer to method of a class. Sqrt is a static method of the Math class.

Instanceof Operators: This operator is useful to know whether an object belongs to a class or an object. New Operators: This operator is useful to create an object to a class or an object. Control Statements The Control statements are changes the flow of the execution of programing statements. Using control statements it is possible to create computers and difficult programs with complex or critical logics.

Control statements are divided into 3 parts, they are 1. Branching Statements 2. Looping Iterative statements 3. Jump statements Branching Statements: Branching conditional statements can be divided into two parts they are Un Conditional Conditional. Un Conditional: The keywords goto are reserved but not used. In the early days of Java, it is a UnConditional Statement; Java does not allow the goto control statement because a mass of tangled jumps and conditional branches that makes a program virtually impossible to understand.

This conditional statements executes a task one or more statements depending upon whether a conditional is true or not. This conditional statements is useful to execute a particular task from among several tasks depending upon the value of a variable.

Statements 1;. Case n: Statements n; [default: If none of the statements are selected in the switch statement then default case will be executed by default.

Switch Statement is most suitable to Menu Driven programs. Looping Iterative statements: A loop iterative can execute several times but a statement can execute in one time there are four types of looping statements. The for loop operates as follows. When the loop first starts, the initialization portion of the loop is executed. Generally, this is an expression that sets the value of the loop control variable, which acts as a counter that controls the loop.

It is important to understand that the initialization expression is only executed once. Next, condition is evaluated. This must be a Boolean expression.

It usually tests the loop control variable against a target value. If this expression is true, then body will executed.

If it is false, the loop terminates. Next, the iteration portion of the loop is executed. The loop then iterates, first evaluating the conditional expression, then executing the body of the loop, and then executing the iteration expression with each pass.

This process repeats until the controlling expression is false. For loop is used to execute for a fixed no. We can write for loop by eliminating initialization; condition; iteration expressions or any two expressions or all of the three expressions. A loop that is executed for ever is called infinite looping statement. Infinite loops are draw back in a program To terminate or stop the continuous execution of infinite looping program it is needed to use a shortcut key on keyboard.

Nested Loops Java allows loops to be nested. That is, one loop may be inside another.

For example, here is a syntax that nests for loops: This loop repeatedly executes group of statements foreach element of a collection A collection represents a group of elements or objects. Using foreach statement each element of an array arr[] will executes.

A jump statement allows your program to execute in a non-leaner fashion. Java supports three jump statements: These statements transfer control to another part of your program. In Java, the break statement has three uses. First, as you have seen, it terminates a statement sequence in a switch statement. Second, it can be used to exit a loop. Third, it can be used as a civilized form of goto. The last two uses are explained here. Using break to exit a loop Ex.

Using break as a Form of Goto: The general form of the labeled break statement is shown here: When this form of break executes, control is transferred out of the named block of code. The labeled block of code must enclose the break statement, but it does not need to be the immediately enclosing block.

This means that you can use a labeled break statement to exit from a set of nested blocks. But you cannot use break to transfer control to a block of code that does not enclose the break statement. This is after second block. It is useful to force an early iteration of a loop.

That is, you might want to continue running the loop, but stop processing the remainder of the code in its body for this particular iteration.

Here is an example program that uses continue to cause two numbers to be printed on each line: Here is an example program that uses continue to print a triangular multiplication table for 0 through 9. The last control statement is return.

The return statement is used to explicitly return from a method. That is, This return statement immediately terminates the method in which it is executed and come back to the calling method. This return statement can be return some resulting value to the calling method. The following example illustrates this point: Return statement in main method will terminate the application. What is difference between System. Represents normal termination. Represents termination due to an error. IO Streams basics A Stream represents the act of flow of data from one place to another place.

A stream is an abstraction that either produces or consumes information.


Play a video or audio file as it downloads from the Internet. There are two types of streams 1. They are reading or receive the data. They are writing or send the data. All streams are represented as classes in java. The Predefined Streams: All Java programs automatically import the java. This package defines a class called System, which encapsulates several aspects of the run-time environment.

For example, using some of its methods, you can obtain the current time and the settings of various properties associated with the system. System also contains three predefined stream variables, in, out, and errs. These fields are declared as public and static within System. This means that they can be used by any other part of your program and without reference to a specific System object.

By default, this is the console. These are byte streams, even though they typically are used to read and write characters from and to the console. Here we can wrap these within character-based streams. Reading Console Input: Attach InputeStreamReader to the keyboard. The object of InputStreamReader to the keyboard object. It reads a single line characters.

R nageswara rao core java ebook

It reads a string or a group of characters. The preferred method of reading console input for Java 2 is to use a character-oriented stream, which makes your program easier to internationalize and maintain. Reading Characters: To read a character from a BufferedReader, use read. The version of read that we will be using is int read throws IOException Each time that read is called, it reads a character from the input stream and returns it as an integer value.

It returns 1 when the end of the stream is encountered. As you can see, it can throw an IOException. The following program demonstrates read by reading characters from the console until the user types a q: This output may look a little different from what you expected, because System. As you can guess, this does not make read particularly valuable for interactive, console input.

Reading String: To read a string from the keyboard, use the version of readLine that is a member of the BufferedReader class. Its general form is shown here: The following program demonstrates BufferedReader and the readLine method; the program reads and displays lines of text until you enter the word stop: Enter 'stop' to quit. The next example creates a tiny text editor. It creates an array of String objects and then reads in lines of text, storing each line in the array. It will read up to lines or until you enter stop.

It uses a BufferedReader to read from the console. Reading Integer value: Float data type can represents up to 7 decimal digits it will display accurately after decimal point.

Reading double number: Console output is most easily accomplished with print and println , These methods are defined by the class PrintStream which is the type of the object referenced by System. Even though System. However; a character-based alternative is described in the next section. Because PrintStream is an output stream derived from OutputStream, it also implements the low-level method write. Thus, write can be used to write to the console.

The simplest form of write defined by PrintStream is shown here:We can use array symbol before the array name also Ex: Immutability of Strings. The following declares a two-dimensional array variable called 2D. Float Data Type: Com rated it it was amazing Aug 14, Heap Memory: Formatting the Output. But you cannot use break to transfer control to a block of code that does not enclose the break statement.