<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4415873721742255009</id><updated>2026-03-14T05:00:04.569-07:00</updated><category term="C++ Program to Display Factors of a Number"/><category term="C++ structure program"/><category term="operators in c++"/><category term="&#39;this&#39; reference in Java"/><category term="Abstract Class and Methods in Java"/><category term="Abstract Class in Java"/><category term="Abstract Class in Java with example"/><category term="Abstract Method in Java"/><category term="Access Modifiers in Java"/><category term="Accessing namespace declarations"/><category term="Accessing of Friend Function in c++"/><category term="Adding Two Numbers in Java"/><category term="Advanced for loop in java"/><category term="Advantage of Javascript"/><category term="Advantages and Disadvantages of ER model"/><category term="Advantages of Database Management System"/><category term="Advantages of ER model"/><category term="Advantages of Inheritance in C++"/><category term="Advantages of Mesh Topology"/><category term="Advantages of Ring Topology"/><category term="Advantages of Star Topology"/><category term="Advantages of Tree Topology"/><category term="Advantages of bus topology"/><category term="Advantages of data redundancy in RDBMS"/><category term="Anagram Program In Java"/><category term="Arithmetic Operators in java"/><category term="Armstrong Number In Java Program"/><category term="Assignment operator in java"/><category term="Basic Concept of Object Oriented Programming"/><category term="Binary Search Algorithm in Java"/><category term="Binary Search in Java"/><category term="Binary Search in Java Using Arrays.binarySearch()"/><category term="Binary Search in Java Using Recursion"/><category term="Bitwise operator in java"/><category term="Break Statement in Java"/><category term="Bubble Sort"/><category term="Bubble sort in c++"/><category term="Bus Topology"/><category term="C and C++"/><category term="C and C++ difference"/><category term="C++ Abstract Class"/><category term="C++ Constructor Initializer List"/><category term="C++ Deep Copy and Shallow Copy"/><category term="C++ Default Arguments"/><category term="C++ Destructor concept"/><category term="C++ Dynamic Constructor"/><category term="C++ Exception Handling"/><category term="C++ Function Overloading"/><category term="C++ Function Overloading Concept"/><category term="C++ Function Overriding"/><category term="C++ If"/><category term="C++ Initializer List"/><category term="C++ Method Overriding in C++"/><category term="C++ Namespaces"/><category term="C++ Nested Classes"/><category term="C++ Opening &amp; Closing Files"/><category term="C++ Operator Overloading"/><category term="C++ Operator Overloading with example"/><category term="C++ Operators"/><category term="C++ Pointers"/><category term="C++ Program Binary Search"/><category term="C++ Program Bubble Sort"/><category term="C++ Program Insertion Sort"/><category term="C++ Program Linear Search"/><category term="C++ Program example"/><category term="C++ Program for Binary Search"/><category term="C++ Program for Bubble Sort"/><category term="C++ Program for Dynamic Constructor"/><category term="C++ Program for Fibonacci Series using Recursion"/><category term="C++ Program for Fibonacci Series using Recursion function"/><category term="C++ Program for Insertion Sort"/><category term="C++ Program for Linear Search"/><category term="C++ Program for Searching"/><category term="C++ Program for Selection Sort"/><category term="C++ Program for Selection Sort Using Class"/><category term="C++ Program to Add Two Matrices"/><category term="C++ Program to Check Alphabet or Not"/><category term="C++ Program to Check Leap Year"/><category term="C++ Program to Check Number is Armstrong or Not"/><category term="C++ Program to Check String Object is Palindrome or not"/><category term="C++ Program to Check Whether C-Style String is Palindrome or not"/><category term="C++ Program to Check Whether a Number is Palindrome or Not"/><category term="C++ Program to Check Whether a Number is Prime or Not"/><category term="C++ Program to Check whether a year is Leap year or not"/><category term="C++ Program to Concatenate C-Style Strings"/><category term="C++ Program to Concatenate String Object"/><category term="C++ Program to Concatenate Two Strings"/><category term="C++ Program to Convert Binary Number to Decimal Number"/><category term="C++ Program to Convert Binary to Decimal"/><category term="C++ Program to Convert Celsius to Fahrenheit"/><category term="C++ Program to Convert Decimal number to Binary number"/><category term="C++ Program to Convert Decimal to Binary"/><category term="C++ Program to Convert Decimal to Binary Value"/><category term="C++ Program to Display Multiplication Table"/><category term="C++ Program to Display the Factors of the Given Number"/><category term="C++ Program to Find ASCII Value of a Character"/><category term="C++ Program to Find Factorial of Number"/><category term="C++ Program to Find Frequency of Characters in a C-Style String"/><category term="C++ Program to Find Frequency of Characters in a String"/><category term="C++ Program to Find Frequency of Characters in a String Object"/><category term="C++ Program to Find GCD"/><category term="C++ Program to Find HCF"/><category term="C++ Program to Find LCM"/><category term="C++ Program to Find LCM of Two Numbers"/><category term="C++ Program to Find Largest Element in Array"/><category term="C++ Program to Find Largest Element in Array Using Functions"/><category term="C++ Program to Find Prime Factors of a Number"/><category term="C++ Program to Find Roots of Quadratic Equation"/><category term="C++ Program to Find Sum of Square"/><category term="C++ Program to Find Sum of Square of first n Natural Numbers"/><category term="C++ Program to Find Sum of Square of n Natural Numbers"/><category term="C++ Program to Find Transpose of a Matrix"/><category term="C++ Program to Find the Length of a String"/><category term="C++ Program to Generate Multiplication Table"/><category term="C++ Program to Implement Bubble Sort"/><category term="C++ Program to Make Simple Calculator"/><category term="C++ Program to Merge two Arrays"/><category term="C++ Program to Merge two Arrays in third array"/><category term="C++ Program to Multiply Two Matrices"/><category term="C++ Program to Print ASCII Value of a Character"/><category term="C++ Program to Print Fibonacci Series"/><category term="C++ Program to Print Fibonacci Series upto Certain Number"/><category term="C++ Program to Print Multiplication Table"/><category term="C++ Program to Reverse Array"/><category term="C++ Program to Reverse an Array"/><category term="C++ Program to Reverse an Array elements"/><category term="C++ Program to Swap Two Numbers"/><category term="C++ Program to Swap Two Numbers Using Bitwise Operator"/><category term="C++ Program to Swap Two Numbers without third variable"/><category term="C++ Program to Transpose of a Matrix"/><category term="C++ Program to display Fibonacci Series"/><category term="C++ Programming Code to Check Alphabet or Not"/><category term="C++ Programming Code to Check Leap Year or Not"/><category term="C++ Programming Code to Print Prime Numbers"/><category term="C++ Programming code to Add Two Matrices"/><category term="C++ Programming code to Multiply Two Matrices"/><category term="C++ Pure Virtual Function"/><category term="C++ Runtime Polymorphism"/><category term="C++ Sizeof Operator"/><category term="C++ Static Member of Class"/><category term="C++ String Using Char Array"/><category term="C++ String Using String Class"/><category term="C++ Structure Program of Bank Account System"/><category term="C++ Structure Program to Store Information of Student"/><category term="C++ Template Arguments"/><category term="C++ Template Classes"/><category term="C++ Template Functions"/><category term="C++ Templates"/><category term="C++ Virtual Destructor"/><category term="C++ Virtual Functions"/><category term="C++ program for sum of digits of given number using for loop"/><category term="C++ program to Reverse Number"/><category term="C++ program to check whether a character is alphabet or not"/><category term="C++ program to find sum of digits for a given number"/><category term="C++ program to print multiplication table up to a given range"/><category term="C++ program to read matrix of size m x n using function"/><category term="C++ programming code to transpose a matrix"/><category term="C++ reference variables"/><category term="C++ string"/><category term="C++ this Pointer"/><category term="CD-ROM"/><category term="Check Leap Year or Not in C++"/><category term="Command Line Arguments"/><category term="Command Line Arguments in Java"/><category term="Command Line Arguments in Java Programming"/><category term="Concept of Object Oriented Programming"/><category term="Conditional operator in java"/><category term="Constructor Overloading in Java"/><category term="Constructor in Java"/><category term="Continue Statement in Java"/><category term="Continue Statement with Inner Loop"/><category term="Convert Celsius to Fahrenheit Program in Java"/><category term="Convert Decimal to Binary in Java"/><category term="Convert Octal to Decimal in Java"/><category term="Convert hexadecimal number to decimal number in java"/><category term="Copy Constructor in Java"/><category term="Creating and Using package in Java"/><category term="Creating namespace in c++"/><category term="DBA"/><category term="DBMS (Database Management System)"/><category term="DVD"/><category term="DVD Vs CD"/><category term="Data Independence"/><category term="Data Independence in DBMS"/><category term="Data Independence in DBMS and its Types"/><category term="Data Link Layer of OSI Model"/><category term="Data Redundancy in DBMS"/><category term="Data Redundancy in DBMS with example"/><category term="Data link layer"/><category term="Data warehouse concept in DBMS"/><category term="Data warehousing"/><category term="Data warehousing concept in DBMS"/><category term="Data warehousing in DBMS"/><category term="Database Keys in DBMS"/><category term="Database Models in DBMS"/><category term="Declaration of Friend Function in c++"/><category term="Default Arguments in C++"/><category term="Definition of Friend Function in c++"/><category term="Difference Between C and C++"/><category term="Difference Between C++ and C"/><category term="Difference between low level and high level formatting"/><category term="Disadvantages of ER model"/><category term="Disadvantages of Mesh Topology"/><category term="Disadvantages of Ring Topology"/><category term="Disadvantages of Star Topology"/><category term="Disadvantages of Tree Topology"/><category term="Disadvantages of bus topology"/><category term="Disadvantages of data redundancy in DBMS"/><category term="Do While Loop in Java Examples"/><category term="Dynamic Constructor in C++"/><category term="Enhanced for Loop in Java"/><category term="Entity Relationship Diagram Tutorial"/><category term="Error detection"/><category term="Example of Java Copy Constructor"/><category term="Example of Java while Loop"/><category term="Example of Nested Classes in C++"/><category term="Example of Virtual Destructor in c++"/><category term="Example of Virtual Function in C++"/><category term="Example of java continue statement"/><category term="Example of namespace in c++"/><category term="Examples of this pointer in c++"/><category term="Exception Handling in C++"/><category term="Factorial Program in Java"/><category term="Features of Java Language"/><category term="File Handling in c++"/><category term="Final Keyword In Java With Examples"/><category term="Final Keyword in Java"/><category term="Find out the ASCII value from character in Java Example"/><category term="Finding prime factors of individual number in c++"/><category term="FizzBuzz"/><category term="FizzBuzz Program"/><category term="FizzBuzz Program in Java"/><category term="Flow Diagram of Java while Loop"/><category term="Floyd&#39;s triangle in Java"/><category term="Friend Function in C++"/><category term="Full Mesh Topology"/><category term="Function Overloading"/><category term="Function Overloading Concept"/><category term="Function Overriding in C++"/><category term="Functional Dependeny in DBMS"/><category term="Functions of Data Link Layer"/><category term="Functions of Network Layer"/><category term="Functions of Physical Layer"/><category term="Functions of Presentation Layer"/><category term="Functions of Session Layer"/><category term="Functions of Transport Layer"/><category term="How Does a Router Work"/><category term="How To Print Floyd&#39;s Triangle In Java"/><category term="How To Reverse An Array In Java"/><category term="How To Write a Hello World Program in JavaScript"/><category term="How to Compare two String in Java"/><category term="How to Convert String to Int in Java"/><category term="How to check if two String are Anagram in Java"/><category term="How to convert a String to an int in Java"/><category term="How to convert character to ASCII in Java"/><category term="Hybrid Inheritance"/><category term="Hybrid Inheritance in Java"/><category term="Hybrid Inheritance in Java with Example"/><category term="IEEE 488"/><category term="If-Else and Nested If-Else Statement"/><category term="Important points about reference variable"/><category term="Inference Rules for Functional Dependencies"/><category term="Inheritance in C++"/><category term="Inheritance in Java"/><category term="Initializer List in C++"/><category term="Inline function in C++"/><category term="Insertion Sort Program in C++"/><category term="Instances"/><category term="Interface in Java"/><category term="Interface in java with example programs"/><category term="Introduction to C++ language"/><category term="Introduction to Java Programming"/><category term="Introduction to Javascript"/><category term="Java Abstract Classes"/><category term="Java Access Modifiers"/><category term="Java Access Modifiers Example"/><category term="Java Break Statement"/><category term="Java Break Statement with Examples"/><category term="Java Character Class"/><category term="Java Convert String to int"/><category term="Java Copy Constructor"/><category term="Java Final Keyword"/><category term="Java FizzBuzz Program"/><category term="Java Inheritance Example"/><category term="Java Interfaces"/><category term="Java Introduction"/><category term="Java Package"/><category term="Java Primitive Data Types"/><category term="Java Program Reverse Array"/><category term="Java Program Selection Sort"/><category term="Java Program for Bubble Sort"/><category term="Java Program for Fibonacci Series"/><category term="Java Program to Add Two MXN Matrix from User Input"/><category term="Java Program to Add Two Matrices"/><category term="Java Program to Add Two Matrix Using Multi-dimensional Arrays"/><category term="Java Program to Add Two numbers"/><category term="Java Program to Calculate Compound Interest"/><category term="Java Program to Calculate Simple Interest"/><category term="Java Program to Calculate Simple and Compound Interest"/><category term="Java Program to Calculate the Sum of Natural Numbers"/><category term="Java Program to Check Anagram or Not"/><category term="Java Program to Check Armstrong or Not"/><category term="Java Program to Check Leap Year"/><category term="Java Program to Check Leap Year or Not"/><category term="Java Program to Check Palindrome Number using for loop"/><category term="Java Program to Check Palindrome Number using while loop"/><category term="Java Program to Compare Two Strings"/><category term="Java Program to Convert Binary to Decimal Using Integer.parseInt() Method"/><category term="Java Program to Convert Decimal to Binary"/><category term="Java Program to Convert Decimal to Hexadecimal"/><category term="Java Program to Convert Decimal to Octal"/><category term="Java Program to Convert Fahrenheit to Celsius"/><category term="Java Program to Convert Fahrenheit to Centigrade"/><category term="Java Program to Convert Hexadecimal to Decimal"/><category term="Java Program to Convert Octal to Decimal"/><category term="Java Program to Convert String to Int"/><category term="Java Program to Count Number of Digits in a Number"/><category term="Java Program to Display Multiplication Table"/><category term="Java Program to Find Factorial of a Number"/><category term="Java Program to Find Factorial of a Number Using Recursion"/><category term="Java Program to Find Largest Number Among Three Numbers"/><category term="Java Program to Find Largest Number in Array"/><category term="Java Program to Find if a Given Year is a Leap Year"/><category term="Java Program to Find the Largest of Three Numbers"/><category term="Java Program to Generate Multiplication Table"/><category term="Java Program to Left Rotation of Array"/><category term="Java Program to Open Notepad"/><category term="Java Program to Print Fibonacci Series"/><category term="Java Program to Print Floyd Triangle"/><category term="Java Program to Print Multiplication Table"/><category term="Java Program to Print Prime Numbers"/><category term="Java Program to Print Prime Numbers. Java Program to Print Prime Numbers From 1 to n"/><category term="Java Program to Swap Two Numbers without Using Third Variable"/><category term="Java Program to check Even or Odd"/><category term="Java Program to check whether two Strings are anagram or not"/><category term="Java Program to find ASCII value of a Character"/><category term="Java Program to find Even or Odd Number"/><category term="Java Program to find duplicate Characters in a String"/><category term="Java Programming Code for Selection Sort"/><category term="Java Programming Code to Convert Decimal to Binary"/><category term="Java Programming Code to Convert Octal to Decimal"/><category term="Java Scanner Class With Examples"/><category term="Java Scanner class"/><category term="Java Static Block"/><category term="Java Static Method"/><category term="Java Static Nested Class"/><category term="Java Switch"/><category term="Java Switch Case"/><category term="Java Switch Case Statement"/><category term="Java Switch Statement"/><category term="Java Variables"/><category term="Java and Multiple Inheritance"/><category term="Java code to convert Decimal to Octal"/><category term="Java example on how to convert Hexadecimal to decimal"/><category term="Java example on how to convert decimal to hexadecimal"/><category term="Java for Loop"/><category term="Java for Loop examples"/><category term="Java for-each Loop"/><category term="Java for-each Loop Examples"/><category term="Java if Statement"/><category term="Java if else Statement"/><category term="Java if-else-if ladder Statement"/><category term="Java instanceof operator"/><category term="Java nested if ladder Statement"/><category term="Java program for binary search"/><category term="Java program for linear search"/><category term="Java program to print Fibonacci series using recursion"/><category term="Java program to print Fibonacci series without recursion"/><category term="Java string compare sample code examples"/><category term="Java while Loop"/><category term="Java while Loop with Examples"/><category term="Java.lang.Character Class in Java"/><category term="Java.util.Scanner Class"/><category term="JavaScript Introduction"/><category term="JavaScript Program to Display Hello World"/><category term="JavaScript tutorial"/><category term="JavaScript variable"/><category term="Keys in DBMS"/><category term="Left Rotation of Array"/><category term="Left Rotation of Array in Java"/><category term="Limitations of Javascript"/><category term="Linear Search Java Code"/><category term="Linear Search in Java"/><category term="Linear Search using Java"/><category term="Logical operator in java"/><category term="Matrix Addition Example Java Program"/><category term="Mesh Network"/><category term="Mesh Topology"/><category term="Method Overriding in C++"/><category term="Multiple Inheritance in Java"/><category term="Multiple inheritance on Java interfaces"/><category term="Namespaces in C++"/><category term="Nested Classes in C++"/><category term="Network Layer of OSI Model"/><category term="Network layer"/><category term="OSI Model - Data Link Layer"/><category term="OSI Model Application Layer"/><category term="OSI Model: Application Layer and its Functions"/><category term="OSI Model: Physical Layer and its Function"/><category term="Object Oriented Programming"/><category term="Object and Classes in Java"/><category term="Operator Overloading in c++"/><category term="Operators in Java"/><category term="Overriding in C++"/><category term="PHP"/><category term="Packages and import statement in Java"/><category term="Packages in java and how to use them"/><category term="Partial Mesh Topology"/><category term="Physical Layer and its Function"/><category term="Physical Layer of OSI Model"/><category term="Post Decrement Operator"/><category term="Post Increment Operator"/><category term="Pre Decrement Operator"/><category term="Pre Increment Operator"/><category term="Presentation Layer"/><category term="Presentation Layer of OSI Model"/><category term="Primitive Data Types in Java"/><category term="Print Floyd Triangle in Java"/><category term="Print Prime Number in C++"/><category term="Program of Bank Account System"/><category term="Program to Check Armstrong Number in Java"/><category term="Program to Check Whether a Number is Prime or Not"/><category term="Program to Convert Binary to Decimal in Java"/><category term="Program to Convert Celsius to Fahrenheit in c++"/><category term="Program to Convert Decimal to Binary"/><category term="Program to Convert Decimal to Octal in Java"/><category term="Program to Count Number of Digits in Number in Java"/><category term="Program to Find LCM of Two Numbers in c++"/><category term="Program to convert Octal number to Decimal number in Java"/><category term="Program to find gcf in c++"/><category term="Program to reverse an array in Java"/><category term="Protocol in Networking"/><category term="Pulse code modulation"/><category term="RS-232"/><category term="Reading &amp; Writing from/to File in C++"/><category term="Relational operator in java"/><category term="Ring Network"/><category term="Ring Topology"/><category term="Scanner Class in Java"/><category term="Schemas and Subschema in DBMS"/><category term="Selection Sort"/><category term="Selection Sort in Java"/><category term="Session Layer and its Functions"/><category term="Session Layer of OSI Model"/><category term="Sizeof Operator in C++"/><category term="Sizeof keyword in C++"/><category term="Star Network"/><category term="Star Topology"/><category term="Static Members in Java"/><category term="Static and dynamic binding in java"/><category term="Static binding in java"/><category term="Static local variable"/><category term="Static member functions"/><category term="Static member variable"/><category term="Storage Classes in C++"/><category term="String Comparison in Java"/><category term="Sum of First N Natural Numbers in Java"/><category term="Syntax of Java Inheritance"/><category term="Syntax of Nested Classes in C++"/><category term="Syntax of Reference Variable in c++"/><category term="Syntax of Virtual Destructor in C++"/><category term="Syntax of creating namespace"/><category term="The using directive"/><category term="This Keyword in Java"/><category term="Transport Layer"/><category term="Transport Layer of OSI Model"/><category term="Type Casting in Java"/><category term="Type Conversion in Java"/><category term="Types of Inheritance in C++"/><category term="Types of Inheritance in C++ with example"/><category term="Types of Inheritance in Java"/><category term="Types of Operators"/><category term="Types of Variables in Java"/><category term="Use of &quot;this&quot; keyword in java"/><category term="Use of Pure Virtual Function in c++"/><category term="Uses of Java Inheritance"/><category term="Virtual Functions in C++"/><category term="What Is a Package?"/><category term="What Is an Interface?"/><category term="What is Bus Network"/><category term="What is Bus Topology"/><category term="What is Data-Link layer"/><category term="What is Protocol"/><category term="What is Protocol in Networking"/><category term="What is Ring Network"/><category term="What is Ring Topology"/><category term="What is Router"/><category term="What is Router in Computer Networking"/><category term="What is Router in Networking"/><category term="What is Star Topology"/><category term="What is Tree Topology"/><category term="What is WWW"/><category term="What is router basics"/><category term="What is the Application Layer"/><category term="What is the World Wide Web"/><category term="When to use virtual destructor in c++?"/><category term="Write a C++ Program to Make Simple Calculator"/><category term="Write a C++ program to Solve Quadratic equation"/><category term="Write a program for Bubble Sort in java"/><category term="Write a program to implement Linear search"/><category term="Writing Your First JavaScript Program"/><category term="access modifiers in c++"/><category term="accessing structure members in c++"/><category term="addition of two matrices in c++"/><category term="advantages of c++ language over c language"/><category term="application layer functions"/><category term="application layer of osi model"/><category term="armstrong number in c++"/><category term="array in java"/><category term="attributes in dbms"/><category term="binary search in c++"/><category term="break statement"/><category term="bubble sort in java"/><category term="c++ access modifiers"/><category term="c++ concept"/><category term="c++ constructor"/><category term="c++ data files"/><category term="c++ file streams"/><category term="c++ friend function"/><category term="c++ function calling"/><category term="c++ function declaration"/><category term="c++ function definition"/><category term="c++ functions"/><category term="c++ if else statement"/><category term="c++ if statement"/><category term="c++ inheritance"/><category term="c++ inline function"/><category term="c++ introduction"/><category term="c++ looping"/><category term="c++ nested if else statement"/><category term="c++ program to Display Prime Numbers When Larger Number is Entered first"/><category term="c++ program to convert binary to decimal value"/><category term="c++ program to count digits in a string"/><category term="c++ program to count number of consonants in a string"/><category term="c++ program to count number of vowels in a string"/><category term="c++ program to count number of white spaces in a string"/><category term="c++ program to find armstrong number"/><category term="c++ program to find compound interest"/><category term="c++ program to find simple interest"/><category term="c++ program to find simple interest and compound interest"/><category term="c++ program to palindrome number"/><category term="c++ program to print prime numbers in a given range"/><category term="c++ program to read a matrix using function"/><category term="c++ program to search an element in an array"/><category term="c++ program using structure and function"/><category term="c++ quadratic equation solver code"/><category term="c++ storage classes"/><category term="c++ string class"/><category term="c++ structure"/><category term="c++ tokens"/><category term="call by address in c++"/><category term="call by reference in c++"/><category term="call by values in c++"/><category term="character class in java"/><category term="check sum"/><category term="class/static variables in java"/><category term="computer network according to geographical coverage"/><category term="concatenate two strings in c++"/><category term="constants in c++"/><category term="copy constructor"/><category term="cyclic redundancy check"/><category term="data types in java"/><category term="deep copy in c++"/><category term="default arguments c++"/><category term="default constructor"/><category term="destructor c++"/><category term="destructor in c++"/><category term="disadvantages of Inheritance in C++"/><category term="disk formatting"/><category term="do while loop in c++"/><category term="do while loop in java"/><category term="drum scanner"/><category term="dynamic binding in java"/><category term="er diagram concept."/><category term="factorial of number in c++"/><category term="factorial series in c++ using recursion"/><category term="facts of c++"/><category term="features of c++"/><category term="flatbed scanner"/><category term="floppy disk"/><category term="fm"/><category term="for loop"/><category term="for loop in c++"/><category term="for loop in java"/><category term="for-each Loop in Java"/><category term="full duplex"/><category term="get video duration and thumbnail php"/><category term="get video information php"/><category term="half duplex"/><category term="hamming code"/><category term="handheld scanner"/><category term="hard disk"/><category term="hard disk drive"/><category term="hard drive"/><category term="hdd vs ssd"/><category term="how data is stored in floppy disk"/><category term="how to print character using ascii value in c++"/><category term="how to write java program in notepad and run"/><category term="identifiers in c++"/><category term="if else statement in java"/><category term="inheritance visibility modes in c++"/><category term="inline function"/><category term="instance variables in java"/><category term="instanceof in java"/><category term="instanceof operator in Java"/><category term="introduction of inheritance in C++"/><category term="java"/><category term="java Object and Classes"/><category term="java Single Dimensional Array"/><category term="java array"/><category term="java array initialization"/><category term="java code to open a text file"/><category term="java constructor"/><category term="java continue statement"/><category term="java data types"/><category term="java decrement operators"/><category term="java default constructor"/><category term="java do while loop"/><category term="java do while loop examples"/><category term="java if else"/><category term="java increment operators"/><category term="java inheritance"/><category term="java method overloading"/><category term="java method overloading example"/><category term="java multidimensional array"/><category term="java multiple inheritance"/><category term="java operators"/><category term="java parameterized constructor"/><category term="java program for palindrome"/><category term="java program for prime number"/><category term="java program to add two numbers using scanner"/><category term="java program to check prime number"/><category term="java program to check prime number or not"/><category term="java program to check prime number or not using for loop"/><category term="java program to convert binary to decimal"/><category term="java program to find greatest of n numbers"/><category term="java program to find leap year"/><category term="java program to find prime number"/><category term="java program to find sum of natural numbers"/><category term="java program to print multiplication table of a given number"/><category term="java program to swap two numbers"/><category term="java static variables"/><category term="java super constructor"/><category term="java super method"/><category term="java super variable"/><category term="java this keyword"/><category term="keywords in c++"/><category term="local variables in java"/><category term="low level formatting. high level formatting"/><category term="merge two arrays in third array"/><category term="method overloading in java"/><category term="method overloading in java example"/><category term="mfm"/><category term="multiplication of two matrices in c++"/><category term="narrowing conversion in java"/><category term="network layer in osi model"/><category term="notepad program in java source code"/><category term="osi physical layer"/><category term="overloading"/><category term="packages in java"/><category term="palindrome in c++"/><category term="palindrome program in java"/><category term="parameterized constructor"/><category term="parity check"/><category term="php embed/embed"/><category term="pointers in c++"/><category term="pointers in c++ examples"/><category term="pointers in c++ notes"/><category term="printer"/><category term="program of array rotation"/><category term="program to Reverse Number"/><category term="program to Reverse Number in c++"/><category term="program to find hcf in c++"/><category term="program to find lcm in c++"/><category term="program to find the length of a string in c++"/><category term="public private protected keywords in c++"/><category term="quadratic equation c++ source code"/><category term="read and display array using function"/><category term="recording techniques"/><category term="scanner"/><category term="selection sort in c++"/><category term="session layer"/><category term="shallow copy in c++"/><category term="sheet-fed scanner"/><category term="simplex"/><category term="solid drive"/><category term="solid state drive"/><category term="ssd"/><category term="storage classes"/><category term="storage classes in c++ with example"/><category term="structure declaration in c++"/><category term="structure in c++"/><category term="super keyword in java"/><category term="super keyword in java with example"/><category term="switch statement in java"/><category term="this Pointer in C++"/><category term="tokens in c++"/><category term="tree topology"/><category term="types attributes in dbms"/><category term="types of array in java"/><category term="types of attributes in dbms with example"/><category term="types of constructors in c++"/><category term="types of printer"/><category term="types of tokens in c++"/><category term="variables in c++"/><category term="variables in java"/><category term="virtual destructor in c++"/><category term="what is Presentation layer"/><category term="what is class in java"/><category term="what is computer network"/><category term="what is computer networking"/><category term="what is network"/><category term="what is networking"/><category term="what is object in java"/><category term="what is protocol in internet"/><category term="what is transport layer"/><category term="what is www explain"/><category term="while loop in c++"/><category term="while loop in java"/><category term="widening conversion in java"/><category term="world wide web"/><category term="write a program to find out duplicate characters in a string"/><title type='text'>Pc Technical Pro - Free Computer Education</title><subtitle type='html'>A blog about computer education, networking, DBMS, programming languages and web design.&#xa;&#xa;&#xa;Learn and grow with Pc Technical Pro.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default?start-index=26&amp;max-results=25'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>206</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-3053820437458393193</id><published>2020-06-07T06:14:00.001-07:00</published><updated>2020-06-07T06:14:57.634-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Functional Dependeny in DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="Inference Rules for Functional Dependencies"/><title type='text'>Functional Dependeny in DBMS</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;font size=&quot;4&quot;&gt;Functional dependency in DBMS is a constraint between two set of attributes. In a relational database schema having n attributes, there exists a universal relation R = {A1, A2, A3, ..., An}. A functional dependency is denoted by X→Y, where X and Y are subset of R. In relation R, attribute (or set of attributes) Y is functionally dependent to attribute X, means value of X can uniquely determine the value of Y.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;The abbreviation of functional dependency is FD or f.d.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr_LN_q2rW3aMSrpGJD0R8j2RNyrbXL027Q9Y3xN0oahpG8P1dWKxHjxxjP1ZD6FbnRqBkSI4ZixCpns9H2EAVKUKwDuLJog_gp93Dj9STbnilY12mce9scM5tPMCZLyoo33U7bl5-d1QL/s217/fd1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;110&quot; data-original-width=&quot;217&quot; height=&quot;101&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr_LN_q2rW3aMSrpGJD0R8j2RNyrbXL027Q9Y3xN0oahpG8P1dWKxHjxxjP1ZD6FbnRqBkSI4ZixCpns9H2EAVKUKwDuLJog_gp93Dj9STbnilY12mce9scM5tPMCZLyoo33U7bl5-d1QL/w200-h101/fd1.png&quot; width=&quot;200&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;The left hand side is called determinant and right hand side is dependent.&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Consider the below relation, in this each value of X uniquely determines value of Y&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6mKqQTh1XJi5SLBJsZHDIzFXCjPP7b7A88Cl9ORNrgHbO901GcIgzdr-eGWN-1UilXlL03EBRptercJMmw7hIUj9mXhwgbNJFmdMlebYM-cxLu-PjCSgvPUwZ_nJ9DZuHPcy0jxuAOOag/s397/fd2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;319&quot; data-original-width=&quot;397&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6mKqQTh1XJi5SLBJsZHDIzFXCjPP7b7A88Cl9ORNrgHbO901GcIgzdr-eGWN-1UilXlL03EBRptercJMmw7hIUj9mXhwgbNJFmdMlebYM-cxLu-PjCSgvPUwZ_nJ9DZuHPcy0jxuAOOag/w200-h161/fd2.png&quot; width=&quot;200&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Now consider the below table, here there are two 1s in X attribute but both determines two different value of Y, this violates functional dependency X-&amp;gt;Y.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9d-RHuR62zbDkftcMCOmMcrBBJyMOuNLI61IF2n7nnff-myzwAe47l0-iAPyGQe10jNFwxsIvNLJCKnBftOscUiEKOBastr7Ul4YuvLTnrXxTodqj0i2b7TjdBp0cgATp1M7B7KbgJm0S/s397/fd3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;319&quot; data-original-width=&quot;397&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9d-RHuR62zbDkftcMCOmMcrBBJyMOuNLI61IF2n7nnff-myzwAe47l0-iAPyGQe10jNFwxsIvNLJCKnBftOscUiEKOBastr7Ul4YuvLTnrXxTodqj0i2b7TjdBp0cgATp1M7B7KbgJm0S/w200-h161/fd3.png&quot; width=&quot;200&quot; /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;Inference Rules for Functional Dependencies&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;In a database schema, F is a set of functional dependency. But are some other dependency that can be inferred or deduced from functional dependencies FD in F.&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;The set of all dependencies including F as well as other dependencies inferred from F are known as closure of F and it is denoted by F*&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;For example: {Emp_id → {Emp_name, Emp_salary, Emp_mobile}}&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Emp_mobile → {Emp_name, Emp_salary}&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Following dependencies can be inferred from above two FD&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Emp_mobile → Emp_name&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Emp_id → Emp_id&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;The following rules are inference rules for functional dependency.&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Reflexive rule&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If Y ⊆ X, then X →Y&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Augmentation rule&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If {X →Y},&amp;nbsp; then&amp;nbsp; XZ →YZ&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Transitive rule&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If&amp;nbsp; {X →Y, Y →Z}, then X →Z&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Decomposition, or projective, rule&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If {X →YZ}, then X →Y&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Union, or additive, rule&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If {X →Y, X →Z}, then X →YZ&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;b&gt;- Pseudotransitive rule&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If {X →Y, WY →Z}, then WX →Z&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/3053820437458393193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/06/functional-dependeny-in-dbms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3053820437458393193'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3053820437458393193'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/06/functional-dependeny-in-dbms.html' title='Functional Dependeny in DBMS'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr_LN_q2rW3aMSrpGJD0R8j2RNyrbXL027Q9Y3xN0oahpG8P1dWKxHjxxjP1ZD6FbnRqBkSI4ZixCpns9H2EAVKUKwDuLJog_gp93Dj9STbnilY12mce9scM5tPMCZLyoo33U7bl5-d1QL/s72-w200-h101-c/fd1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-3872622415137361674</id><published>2020-05-31T06:21:00.008-07:00</published><updated>2020-05-31T06:45:02.569-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Advantages of data redundancy in RDBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Redundancy in DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Redundancy in DBMS with example"/><category scheme="http://www.blogger.com/atom/ns#" term="Disadvantages of data redundancy in DBMS"/><title type='text'>Data Redundancy in DBMS with example</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;Data redundancy means redundant copies of data within database. Data redundancy leads to data inconsistency which will cause overall database performance. To avoid redundancy problem in database design Normalization is used.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Opensource DBMS mysql provides some ways to avoid redundancy such as joins.&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Example of data redundancy in DBMS&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ4i_PVDrn7L-uaZvVKB4NOGm6ZDjwLugKec1StUSunsT3CoN0WykQa3MdwU_aXlpscW32hfaxhe5u4yD0Z9rI9vT9a46CSVRSfyeCb2yab-0-91StWB-FJpGSyGSIyu36-qfP4Nc9aXRf/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Data redundancy in DBMS&quot; border=&quot;0&quot; data-original-height=&quot;215&quot; data-original-width=&quot;680&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ4i_PVDrn7L-uaZvVKB4NOGm6ZDjwLugKec1StUSunsT3CoN0WykQa3MdwU_aXlpscW32hfaxhe5u4yD0Z9rI9vT9a46CSVRSfyeCb2yab-0-91StWB-FJpGSyGSIyu36-qfP4Nc9aXRf/w640-h202/emp_table.png&quot; title=&quot;Data redundancy in DBMS&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;In the above table, Dep_id and Dep_manager_name is copied into multiple tuples . For example, Dep_id 22 is placed two times in table. If we need to update Dep_manager_name for Dep_id 22, then we have to update all records having Dep_id 22. If Dep_id 22 is placed with thousand records, then we need to update thousand record for small change and this results to increase in computational time.&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Disadvantages of data redundancy in DBMS&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Insertion anomaly&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If there is one more Dep_id, let say 21 and currentlty no employee is working in this department. Then there will be no entry related to this Dep_id in table. Such a situation is known as insertion anomaly.&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Deletion anomaly&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;In the above table, if record Emp_code 3 is deleted, then there will no record related to Dep_id 17. This will cause losing information about Dep_id 17.&amp;nbsp; &amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Updation anomaly&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;If we need to change Dep_manager name, then we have to update to record having same Dep_id. This will increase computation time.&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;Advantages of data redundancy in RDBMS&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;But sometimes, data redundancy is solution when you have unlimited storage and your basic need is faster access of data. When we store data in multiple tables for example student information in STUDENT table and student courses in another table STUDENT_COURSE and we need to access complete student data in one query, then joins is solution. But when data is large enough, joins decrease performance. There are many other solutions for faster join operation like indexing and other database constraint. But if data is large and joins are not working well, then data redundancy is also a solution.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/3872622415137361674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/05/data-redundancy-in-dbms-with-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3872622415137361674'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3872622415137361674'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/05/data-redundancy-in-dbms-with-example.html' title='Data Redundancy in DBMS with example'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ4i_PVDrn7L-uaZvVKB4NOGm6ZDjwLugKec1StUSunsT3CoN0WykQa3MdwU_aXlpscW32hfaxhe5u4yD0Z9rI9vT9a46CSVRSfyeCb2yab-0-91StWB-FJpGSyGSIyu36-qfP4Nc9aXRf/s72-w640-h202-c/emp_table.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-7145615089671609861</id><published>2020-05-29T07:37:00.005-07:00</published><updated>2020-05-30T05:07:22.877-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="get video duration and thumbnail php"/><category scheme="http://www.blogger.com/atom/ns#" term="get video information php"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="php embed/embed"/><title type='text'>Get Video Information PHP | Embed/Embed Package </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;PHP embed/embed package can used used for fetching video information such as duration , thumbnail and many other useful information.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;First install the package via composer&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;span style=&quot;background-color: lightgrey; font-family: verdana; font-size: large; text-align: left; white-space: pre;&quot;&gt;composer require embed/embed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: 13.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;Then, include autoloader.php in source file and fetch video information as follows.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: lightgrey; overflow: auto; padding: 6px;&quot;&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;lt;?php &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;include &quot;../Embed/src/autoloader.php&quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;use Embed\Embed;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;$vidDetail =&amp;nbsp; getVideoDetail(&quot;&amp;lt;your video url&amp;gt;&quot;); //it can be embed link also&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;function getVideoDetail($url){&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp; //Load any url:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;$info = Embed::create($url);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;$duration = &quot;&quot;;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;foreach ($info-&amp;gt;getProviders() as $providerName =&amp;gt; $provider){&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp;foreach($provider-&amp;gt;getBag()-&amp;gt;getAll() as $prKey=&amp;gt;$prVal){&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;		&amp;nbsp; &amp;nbsp;if($prKey == duration){&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;			&amp;nbsp; &amp;nbsp;$duration = $prVal;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;			&amp;nbsp; &amp;nbsp;continue;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;		&amp;nbsp; &amp;nbsp;}&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp;}&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp;if($duration) continue;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;if(strpos($url, &quot;youtube.com&quot;)){&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp; $duration = str_replace(&quot;PT&quot;, &quot;&quot;, $duration);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp; $duration = str_replace(&quot;S&quot;, &quot;&quot;, $duration);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;	&amp;nbsp; &amp;nbsp;&amp;nbsp;$durationArr = explode(&quot;M&quot;, $duration);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;$duration = $durationArr[0] * 60 + $durationArr[1] - 1;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;$thumbnail = $info-&amp;gt;image;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&amp;nbsp; &amp;nbsp;return array(&quot;thumbnail&quot; =&amp;gt; $thumbnail, &quot;duration&quot; =&amp;gt; $duration);&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;}&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;?&amp;gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot; size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;Reference Link:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;verdana&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://github.com/oscarotero/Embed&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;https://github.com/oscarotero/Embed&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://packagist.org/packages/embed/embed&quot;&gt;&lt;font face=&quot;verdana&quot;&gt;https://packagist.org/packages/embed/embed&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/7145615089671609861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/05/get-video-information-php-embedembed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7145615089671609861'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7145615089671609861'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2020/05/get-video-information-php-embedembed.html' title='Get Video Information PHP | Embed/Embed Package '/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-5544521105261009830</id><published>2018-02-25T03:28:00.003-08:00</published><updated>2018-02-25T04:05:26.117-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How To Write a Hello World Program in JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript Program to Display Hello World"/><category scheme="http://www.blogger.com/atom/ns#" term="Writing Your First JavaScript Program"/><title type='text'>JavaScript Program to Display Hello World</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In
JavaScript, you can display any string using alert box. JavaScript alert is a
method of window object. But we can also it explicitly without reference to
window object. There are many other ways in JavaScript to display string like
console.log method.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;



&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;JavaScript Program to Display Hello World using Alert Box&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;lt;!doctype html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
      &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
      &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
      &amp;lt;button onclick=&quot;print()&quot;&amp;gt;Click Me...&amp;lt;/button&amp;gt;
  &amp;lt;/body&amp;gt;
  &amp;lt;script&amp;gt;
      function print(){
          alert(&quot;Hello World...&quot;);
      }
  &amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;button onclick=&quot;print()&quot;&gt;Click Me...&lt;/button&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;When you click on this button, a pop up
box occurs that displaying &quot;Hello World...&quot;.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;JavaScript Program to Display Hello
World using console.log&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;console.log method is used to print
string on console window. If you use this method nothing will display on the
screen, but it will display on console window.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;









&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&amp;lt;!doctype html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
      &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
      &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
      &amp;lt;button onclick=&quot;print()&quot;&amp;gt;Click Me...&amp;lt;/button&amp;gt;
  &amp;lt;/body&amp;gt;
  &amp;lt;script&amp;gt;
      function disp(){
          console.log(&quot;Hello World...&quot;);
      }
  &amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;button onclick=&quot;disp()&quot;&gt;Click Me...&lt;/button&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script&gt;
      function print(){
          alert(&quot;Hello World...&quot;);
      }
      function disp(){
          console.log(&quot;Hello World...&quot;);
      }
  &lt;/script&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/5544521105261009830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/02/javascript-hello-world.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5544521105261009830'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5544521105261009830'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/02/javascript-hello-world.html' title='JavaScript Program to Display Hello World'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-4207107009309675953</id><published>2018-02-11T04:34:00.001-08:00</published><updated>2018-02-11T04:34:50.081-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript variable"/><title type='text'>JavaScript Variables</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;As other
programming languages, JavaScript also supports data types and variables.
Variables are piece of memory blocks in which we can store data (values). And
data types decides what type of data can be stored in variables and what
operations on variable can be performed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;JavaScript
supports following data types:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Number&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;, e.g.
100, 105.5, 10.0&amp;nbsp;etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;String&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;,&amp;nbsp;e.g.
&#39;abc&#39;, &quot;xyz&quot; etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Boolean&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;, e.g.
true and false&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Null&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;and&amp;nbsp;&lt;b&gt;Undefined&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Object&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(composite
data type)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;JavaScript
represents numbers as&amp;nbsp;64-bit floating-point format defined by the IEEE 754
standard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Example
of JavaScript Variable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;var&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;keyword is used to declare variables in
JavaScript&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;





























&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
      var a = 10;
      var b = 20;
      var c = a + b;
&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In above example, we define three
variable using var keyword namely a, b and c. Variables a and b stores 10 and
20 respectively. And sum of a and b is assigned to variable c.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;JavaScript Identifiers&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;All
names are Identifiers. A variable must have unique name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;-
Reserved words cannot be used as a variables name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;-
Variables name should not start with a number like 0, 1, 2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;-
Variable name should start with a alphabets or underscore like abc, _abc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;-
All variable names are case sensitive.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/4207107009309675953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/02/javascript-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4207107009309675953'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4207107009309675953'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/02/javascript-variables.html' title='JavaScript Variables'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-3873098302364169895</id><published>2018-01-25T03:45:00.000-08:00</published><updated>2018-01-25T03:45:25.995-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Advantage of Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript Introduction"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="Limitations of Javascript"/><title type='text'>Introduction to Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;is a
client side scripting language. It is a primary used language on the web. It is
lightweight and interpreted language. Javascript has ability to change HTML
content. Today all modern web browsers support javascript.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript
is developed by Netscape Communication at 1995. Javascript was first known as
liveScript and then it changed to Javascript, may be because of popularity of
Java.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Advantage
of Javascript&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;It is
client side scripting language. Javascript code runs by the user processer and
thus it saves bandwidth interaction with server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript
is easy to learn and it’s much look like English language.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript has
plenty of predefined function, variable thus provides greater functionality to
the user.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Using
javascript you can create interactive web pages that catches attraction of site
visitor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;It is
fast because it runs on user system and its need not be process on web server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Limitations
of Javascript&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript
code can be used by hackers to infect user&#39;s system, so it is security issue.
Modern web browsers set some restriction but still, it’s not fully secure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Using
javascript, you can&#39;t work with files on server because it is a client side
scripting language.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javascript
doesn&#39;t support multithreading.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Javscript
depends on browser, so it is interpreted differently on different browsers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;All
browsers has option to disable javascript, so user can disable
javascript.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/3873098302364169895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/introduction-to-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3873098302364169895'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/3873098302364169895'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/introduction-to-javascript.html' title='Introduction to Javascript'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-9222843942847719021</id><published>2018-01-15T03:31:00.000-08:00</published><updated>2018-01-15T03:31:32.195-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to find duplicate Characters in a String"/><category scheme="http://www.blogger.com/atom/ns#" term="write a program to find out duplicate characters in a string"/><title type='text'>Java Program to Find Duplicate Characters in a String</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;This java
program finds duplicate characters in a string. In this program, we assign a
string to a variable named &quot;str&quot; and this string is converted to
character array using toCharArray() method and assigned to a variable
&quot;c&quot;. Then using nested for loop, we compare each character of char
array to the other characters in array and if they match, we print that
character.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;



&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java Program to Find Duplicate Characters in a String&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class FindDuplicateString{
 public static void main(String[] args){
  String str = &quot;java&quot;;
  char[] c = str.toCharArray();
  System.out.print(&quot;Duplicate characters : &quot;);
  for(int i=0; i&amp;lt;str.length(); i++){
   for(int j=i+1; j&amp;lt;str.length(); j++){
    if(c[i] == c[j]){
              System.out.print(c[i]+&quot; &quot;);         }
   }   
  }
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Duplicate characters : a&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/9222843942847719021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/java-program-find-duplicate-characters-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/9222843942847719021'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/9222843942847719021'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/java-program-find-duplicate-characters-string.html' title='Java Program to Find Duplicate Characters in a String'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-7102955371327246691</id><published>2018-01-06T03:49:00.002-08:00</published><updated>2018-01-06T03:49:40.731-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to convert a String to an int in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="How to Convert String to Int in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Convert String to int"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Convert String to Int"/><title type='text'>Java Program to Convert String to Int</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In java,
we can convert string to integer using static methods like parseInt() and
valueOf().&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java String to Int Using Integer.parseInt()&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;







&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;parseInt()
is a static method of Integer class, this method returns a primitive int.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class StringToInt{
 public static void main(String[] args){
  String str=&quot;100&quot;;
  
  //String to Int using parseInt method
  int a = Integer.parseInt(str);
  System.out.println(&quot;Sum is &quot;+(a+10));
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Sum is 110&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java
String to Int Using Integer.valueOf()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;valueOf()
method returns a Integer object.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class StringToInt{
 public static void main(String[] args){
  String str=&quot;100&quot;;
  
  //String to Int using parseInt method
  Integer a = Integer.valueOf(str);
  System.out.println(&quot;Sum is &quot;+(a+10));
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Sum is 110&lt;/span&gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/7102955371327246691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/java-program-to-convert-string-to-int.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7102955371327246691'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7102955371327246691'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2018/01/java-program-to-convert-string-to-int.html' title='Java Program to Convert String to Int'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-511890694341801214</id><published>2017-12-30T05:33:00.001-08:00</published><updated>2017-12-30T05:33:49.455-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to Compare two String in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Compare Two Strings"/><category scheme="http://www.blogger.com/atom/ns#" term="Java string compare sample code examples"/><category scheme="http://www.blogger.com/atom/ns#" term="String Comparison in Java"/><title type='text'>Java Program to Compare Two Strings</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In java,
we can compare two strings using some predefined methods namely, &lt;b&gt;equals()&lt;/b&gt; and&amp;nbsp;&lt;b&gt;equalsIgnoreCase()&lt;/b&gt; method. Strings can also be compared using &lt;b&gt;==&lt;/b&gt; operator.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;



&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java program to compare strings by equals() method&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;public class CompareString{
   public static void main(String []args){
      String s1 = &quot;pctechnicalpro&quot;;
      String s2 = &quot;pctechnicalpro&quot;;
      String s3 = &quot;Pctechnicalpro&quot;;
      String s4 = new String (&quot;pctechnicalpro&quot;);
   
      //compare s1 with s2
      System.out.println(s1.equals(s2));
   
      //compare s1 with s3
      System.out.println(s1.equals(s3));
   
      //compare s1 with s4
      System.out.println(s1.equals(s4));
   }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;true
false
true&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;equals()
method return true if sequence of characters is same in both string objects,
otherwise it returns false.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;



&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java program to compare strings by equalsIgnoreCase() method&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;public class CompareString{
   public static void main(String []args){
      String s1 = &quot;pctechnicalpro&quot;;
      String s2 = &quot;pctechnicalpro&quot;;
      String s3 = &quot;Pctechnicalpro&quot;;
      String s4 = new String (&quot;pctechnicalpro&quot;);
   
      //compare s1 with s2
      System.out.println(s1.equalsIgnoreCase(s2));
   
      //compare s1 with s3
      System.out.println(s1.equalsIgnoreCase(s3));
   
      //compare s1 with s4
      System.out.println(s1.equalsIgnoreCase(s4));
   }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;true
true
true&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;equalsIgnoreCase()
method ignore the case and returns true if both string objects have same
sequence of character, otherwise it returns false.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;

&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/511890694341801214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/java-program-to-compare-two-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/511890694341801214'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/511890694341801214'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/java-program-to-compare-two-strings.html' title='Java Program to Compare Two Strings'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-5597230960022842551</id><published>2017-12-23T04:07:00.001-08:00</published><updated>2017-12-23T04:07:16.579-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Find out the ASCII value from character in Java Example"/><category scheme="http://www.blogger.com/atom/ns#" term="How to convert character to ASCII in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to find ASCII value of a Character"/><title type='text'>Java Program to Find ASCII value of a Character</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;ASCII&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(American
Standard for Information Interchange) is a code to represent English characters
using numeric code. It includes upper and lower case English letters, numbers
and punctuation symbols. It assigns a number to each character from 0 to 127.
For example ASCII code for alphabet A is 65. In Java, we can find ASCII value
of character by assigning a character value to integer variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java
Program to Find ASCII Value of Character&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;public class ShowAscii {

    public static void main(String[] args) {

        char ch = &#39;A&#39;;
        int asciiCode = ch;
        // we can also cast char to int
        int castascii = (int)ch;

        System.out.println(&quot;ASCII value of &quot;+ch+&quot; is: &quot; + asciiCode);
        System.out.println(&quot;ASCII value of &quot;+ch+&quot; is: &quot; + castascii);
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;ASCII value of A is: 65
ASCII value of A is: 65&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/5597230960022842551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/java-program-find-ascii-value-character.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5597230960022842551'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5597230960022842551'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/java-program-find-ascii-value-character.html' title='Java Program to Find ASCII value of a Character'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-4525540242316038020</id><published>2017-12-16T22:10:00.001-08:00</published><updated>2017-12-16T22:10:38.510-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java program for linear search"/><category scheme="http://www.blogger.com/atom/ns#" term="Linear Search in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Linear Search Java Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Linear Search using Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Write a program to implement Linear search"/><title type='text'>Linear Search in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Linear
search&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;is a searching technique to search an element in array. We
can also search element in array using &lt;a href=&quot;http://pctechnicalpro.blogspot.com/2017/12/binary-search-in-java.html&quot;&gt;binary search&lt;/a&gt;. Linear search is slower
than binary search, so it is less used. But in linear search we don&#39;t need to
sort an array while performing searching. So both searching technique have
their own advantages and disadvantages.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In
linear search, we traverse an array for searching specific element. If array is
found, we note its index number and if item is not found till end, we display
that &quot;Element is not found&quot;.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;







&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java program for linear search&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;/*Linear Search in Java*/
import java.util.Scanner;
public class LinearSearch{
 public static void search(int arr[], int item){
  int i, flag = 0;
  for(i = 0; i&amp;lt;arr.length; i++){
   if(arr[i] == item){
    flag = 1;
    System.out.println(&quot;Element &quot;+arr[i]+&quot; is found at index &quot;+i);
   }
  }
  if(flag!=1)
   System.out.println(&quot;Element &quot;+arr[i]+&quot; is not found&quot;);
 }
 public static void main(String[] args){
  Scanner read = new Scanner(System.in);
  int []arr = new int[5];
  System.out.print(&quot;Enter Array Element (5 Elements): &quot;);
  for(int i = 0; i&amp;lt;arr.length; i++){
   arr[i] = read.nextInt();
  }
  System.out.print(&quot;Enter the element to search: &quot;);
  int item = read.nextInt();
  search(arr, item);
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter Array Element (5 Elements): 1 2 3 4 5
Enter the element to search: 3
Element 3 is found at index 2&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/4525540242316038020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/linear-search-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4525540242316038020'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4525540242316038020'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/linear-search-in-java.html' title='Linear Search in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-6136177963794775206</id><published>2017-12-07T04:49:00.001-08:00</published><updated>2017-12-07T04:49:44.685-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Binary Search Algorithm in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Binary Search in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Binary Search in Java Using Arrays.binarySearch()"/><category scheme="http://www.blogger.com/atom/ns#" term="Binary Search in Java Using Recursion"/><category scheme="http://www.blogger.com/atom/ns#" term="Java program for binary search"/><title type='text'>Binary Search in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Binary
Search&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;is a simple approach to search an element in array. If you
are using binary search for searching element in array, then array must be
sorted in ascending order. We can sort an array using sorting algorithms or by
using&amp;nbsp;Arrays.sort(arr) method. Binary search is faster than linear search.
Binary search is also known as Half-Interval algorithm.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In&amp;nbsp;&lt;b&gt;binary
search&lt;/b&gt;, we compares the given element with the middle element of array. If
middle element is equal to given element then index of the middle element is
returned. If given element is less than middle element, the algorithm again
repeats on&amp;nbsp;the sub-array to the left of the middle element and if the
given element is greater than middle element, the algorithm again repeats on
the sub-array to the right of the middle element.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Binary
Search in Java&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class BinarySearch{
	public static void binarySearch(int arr[], int start, int end, int key){
		int mid = (start + end)/2;  
		while( start &amp;lt;= end ){
			if ( arr[mid] &amp;lt; key ){
				start = mid + 1;     
			}
			else if ( arr[mid] == key ){
				System.out.println(&quot;Element &quot;+key+&quot; is found at index: &quot; + mid);  
				break;  
			}
			else{
				end = mid - 1;
			}
			mid = (start + end)/2;  
                }  
		if ( start &amp;gt; end ){
			System.out.println(&quot;Element is not found!&quot;);  
		}  
	}  
	public static void main(String args[]){  
        int arr[] = new int[]{10,20,30,40,50};  
        int key = 40; 
        int end = arr.length-1;  
        binarySearch(arr,0,end,key);     
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Element 40 is found at index: 3&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Binary Search in
Java Using Recursion&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class BinarySearch{
	public static int binarySearch(int arr[], int start, int end, int key){  
        if (end&amp;gt;=start){  
            int mid = start + (end - start)/2;  
            if (arr[mid] == key){  
            return mid;  
            }  
            if (arr[mid] &amp;gt; key){  
            return binarySearch(arr, start, mid-1, key);//search in left subarray  
            }
			else{  
            return binarySearch(arr, mid+1, end, key);//search in right subarray  
            }  
        }  
        return -1;  
    }  
    public static void main(String args[]){  
        int arr[] = {10,20,30,40,50};  
        int key = 50;  
        int end=arr.length-1;  
        int result = binarySearch(arr,0,end,key);  
        if (result == -1)  
            System.out.println(&quot;Element is not found!&quot;);  
        else  
            System.out.println(&quot;Element &quot;+key+&quot; is found at index: &quot;+result);  
    }  
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Element 50 is found at index: 4&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Binary
Search in Java Using Arrays.binarySearch()&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;binarySearch()
is a method in Arrays class, so we need to import java.util package.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Arrays;  
class BinarySearch{  
    public static void main(String args[]){  
        int arr[] = {10,20,30,40,50};  
        int key = 20;  
        int result = Arrays.binarySearch(arr,key);  
        if (result &amp;lt; 0)  
            System.out.println(&quot;Element &quot;+key+&quot; not found!&quot;);  
        else  
            System.out.println(&quot;Element &quot;+key+&quot; is found at index: &quot;+result);  
    }  
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Element 20 is found at index: 1&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/6136177963794775206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/binary-search-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6136177963794775206'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6136177963794775206'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/12/binary-search-in-java.html' title='Binary Search in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-6804082815095114664</id><published>2017-11-29T06:04:00.001-08:00</published><updated>2017-11-29T06:04:29.617-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="What is the World Wide Web"/><category scheme="http://www.blogger.com/atom/ns#" term="What is WWW"/><category scheme="http://www.blogger.com/atom/ns#" term="what is www explain"/><category scheme="http://www.blogger.com/atom/ns#" term="world wide web"/><title type='text'>What is the World Wide Web (WWW)?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;The&amp;nbsp;&lt;b&gt;&lt;i&gt;World
Wide Web&lt;/i&gt;&lt;/b&gt;&amp;nbsp;is a repository of information linked together through
hyperlinks all over the world. As Internet have many services and World Wide
Web is one of them. The World Wide Web supports special document that are
formatted in HTML. Tim Berners-Lee, an English&amp;nbsp;scientist, invents WWW in
1989. Berners-Lee developed hyperlinks to link web pages. User can easily
access these web pages through WWW repository.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;The&amp;nbsp;&lt;b&gt;WWW&amp;nbsp;&lt;/b&gt;is
distributed client server service, in which a client access web pages by web
browser. These webpages is stored on server. The web browser sends requests to
the server for specific web page using URL. After receiving the request, the
server sends requested web pages and then these web pages is displayed on
browser screen, it is a short description.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/6804082815095114664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/world-wide-web-www.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6804082815095114664'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6804082815095114664'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/world-wide-web-www.html' title='What is the World Wide Web (WWW)?'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-7157046457014050540</id><published>2017-11-21T03:27:00.000-08:00</published><updated>2017-11-21T03:27:44.924-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Creating and Using package in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Package"/><category scheme="http://www.blogger.com/atom/ns#" term="Packages and import statement in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="packages in java"/><category scheme="http://www.blogger.com/atom/ns#" term="Packages in java and how to use them"/><category scheme="http://www.blogger.com/atom/ns#" term="What Is a Package?"/><title type='text'>Packages in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Package&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;is
a way of grouping a variety of classes and interfaces together. In java,
package is a way to organize set of related classes and interfaces. In simple
words, a package is similar to different folders in our computer. We keep
images in one folder, songs in other folder and so on. So, we keep set of
related documents in one folder. There can be two classes in two different
package can have same name as two files having same name in two different
folders in our computer.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In
java, we have ability to reuse code by extending classes and implementing
interfaces. But if we have to reuse the code written in another program without
copying the code. This can be achieved by using packages. Java provides a class
library for use in our own application called API or Application Programming
Interface. This API provides large number of classes grouped into different
packages according to their functionality.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Advantages of Package in Java&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(1)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;While making a large project, we have many classes and
interfaces, so it is required to group set of related classes and interfaces
into packages. It provides better organisation and improves efficiency.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(2)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;We can put two classes of same name in two different
package, so it avoids name collision.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(3)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;Java package provides reusability of code by using different
classes and interfaces in different packages.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;(4)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;We can&#39;t directly access the code of classes and interfaces,
so it provides access protection.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Types of Package in Java&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Built-in package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Java
already provides many different packages like java.lang.*, java.io.* known as
built-in packages.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;User defined package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;We
can also create our own package known as user defined package.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Example of Java Package&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;

















































&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;package showMe;

public class Show{
 public void disp(){
  System.out.println(&quot;Hello&quot;);
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import showMe.Show;

public class Demo{
 public static void main(String[] agrs){
  Show obj = new Show();
  obj.disp();
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Hello&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In this
example, first we create a package namely &quot;showme&quot; using package
keyword. We define a class called &quot;Show&quot; and this class containing
only one method called &quot;disp&quot;. While putting a class to a package,
the class must be of public access modifier.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;We
can create another class called &quot;Demo&quot;, this class imports
&quot;showMe&quot; using import keyword. In Demo class, we create an object of
&quot;Show&quot; class of &quot;showMe&quot; package and called a method called
&quot;disp&quot;.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;To Compile:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;javac -d . Show.java&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Then
again, javac Demo.java&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;To run Demo class:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;java Demo&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Example 2:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;We
can create a class inside a package while importing another package.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;





















&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;package Package2;
import showMe;

class Example{
 public static void main(String[] args){
 Show obj = new Show();
 obj.disp();
 }
}&lt;/span&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In this
program, first we write package declaration and then we import another package.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;It
is important to know that if we write package declaration statement in our
program, then it must be the first statement of program.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Example 3:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;If
you don&#39;t want to write import statement, then you can use fully qualified
name.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Greatest.java&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;

















&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;package Package1;
public class Greatest{
  public void checkGreatest(int a, int b){
    if(a&amp;gt;b)
   System.out.println(a+&quot; is greater than &quot;+b);
 else
   System.out.println(b+&quot; is greater than &quot;+a); 
  }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Example.java&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;class Example{
 public static void main(String[] args){
 Package1.Greatest obj = new Package1.Greatest();
 obj.checkGreatest(10, 20);
 }
}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 107%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;20 is greater than 10&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Sub
package in Java&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;We
can create a package inside another package. For example, java has also sub
packages like lang, io, net etc.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Show.java&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;package Package1.SubPackage1;
public class Show{
 public void disp(){
  System.out.println(&quot;Welcome&quot;);
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example.java&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;import Package1.SubPackage1.*;
class Example{
 public static void main(String[] args){
 Show obj = new Show();
 obj.disp();
 }
}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Welcome&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/7157046457014050540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/packages-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7157046457014050540'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7157046457014050540'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/packages-in-java.html' title='Packages in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-4050773556513580246</id><published>2017-11-10T05:57:00.000-08:00</published><updated>2017-11-10T05:57:44.789-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Anagram Program In Java"/><category scheme="http://www.blogger.com/atom/ns#" term="How to check if two String are Anagram in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Check Anagram or Not"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to check whether two Strings are anagram or not"/><title type='text'>Java Program to Check Whether Two Strings are Anagram or Not</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;This&amp;nbsp;&lt;b&gt;&lt;i&gt;java
program checks whether two strings are anagram or not&lt;/i&gt;&lt;/b&gt;. Anagram means
producing a new word using rearranging of letters of a word, length of letters
must be same in both new and previous words. In this java program, user will
enter two strings and the code of checking anagram runs and show whether both
strings are anagram or not.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java
Program Check Anagram or Not&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example
1:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In this
program, first we check the length of both strings, if length is same then runs
the if blocks, otherwise run the else block. In else block, print &quot;Strings
are not Anagram&quot;. And in the if block, we take first letter of first
string and compare it with all letters of second string. If the letter not
matches, print &quot;Not Anagram&quot; and exit the program. After checking
first letter of first string, check another letter. When all letter string 1
matches with string 2, prints &quot;Strings are Anagram&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
public class CheckAnagram{
	public static void main(String[] args) {
		String str1, str2;
		Scanner sc = new Scanner(System.in);
		System.out.print(&quot;Enter First String: &quot;);
		str1 = sc.next();
		System.out.print(&quot;Enter Second String: &quot;);
		str2 = sc.next();

		int i, j, found=0;
		if(str1.length() == str2.length()){
			for(i=0; i&amp;lt;str1.length(); i++)
			{
				for(j=0; j&amp;lt;str1.length(); j++){
					if(str1.charAt(i) == str2.charAt(j)){
						found =1;
					}
				}
				if(found==0){
					System.out.println(&quot;Strings are not Anagram&quot;);
					System.exit(0);
				}		
			}
			System.out.println(&quot;Strings are Anagram&quot;);	
		}
		else{
			System.out.println(&quot;Strings are not Anagram&quot;);
		}	
	}
}
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter First String: triangle
Enter Second String: integral
Strings are Anagram&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter First String: alpha
Enter Second String: beta
Strings are not Anagram&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example
2:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;
In this program, first we check the length of both strings and if length is
same if block runs, otherwise else block runs. In else block, print
&quot;Strings are not Anagram&quot;. And in if block, sort both array and
directly compares string 1 with string 2. If both strings matches print
&quot;Strings are Anagram&quot;, otherwise print &quot;String are not
Anagram&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
import java.util.Arrays;
public class CheckAnagram{
	public static void main(String[] args) {
		String str1, str2;
		Scanner sc = new Scanner(System.in);
		System.out.print(&quot;Enter First String: &quot;);
		str1 = sc.next();
		System.out.print(&quot;Enter Second String: &quot;);
		str2 = sc.next();
        
        char c1[] = str1.toCharArray();
        char c2[] = str2.toCharArray();
        str2 = str2.replaceAll(&quot;\\s&quot;, &quot;&quot;);
        Arrays.sort(c1);
        Arrays.sort(c2);
		if(str1.length() == str2.length()){
			if(Arrays.equals(c1, c2))
				System.out.println(&quot;Strings are Anagram&quot;);
			else
				System.out.println(&quot;Strings are not Anagram&quot;);
		}
		else{
			System.out.println(&quot;Strings are not Anagram&quot;);
		}	
	}
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter First String: triangle
Enter Second String: integral
Strings are Anagram&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter First String: alpha
Enter Second String: beta
Strings are not Anagram&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/4050773556513580246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/java-program-to-check-anagram-or-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4050773556513580246'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4050773556513580246'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/java-program-to-check-anagram-or-not.html' title='Java Program to Check Whether Two Strings are Anagram or Not'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-9076035440047565173</id><published>2017-11-03T05:04:00.001-07:00</published><updated>2017-11-03T05:04:41.083-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Left Rotation of Array"/><category scheme="http://www.blogger.com/atom/ns#" term="Left Rotation of Array"/><category scheme="http://www.blogger.com/atom/ns#" term="Left Rotation of Array in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="program of array rotation"/><title type='text'>Left Rotation of Array in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-family: Arial;&quot;&gt;In this article, w will see how to rotate elements of array on
left&amp;nbsp; hand side.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-family: Arial;&quot;&gt;First, we ask the user to enter length of array and number of left
rotation. For example, if user enters 3 left rotation for [1, 2, 3, 4, 5] then
output will be [4, 5, 1, 2, 3]. Length and number of left rotation can&#39;t be a
floating point number.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-family: Arial;&quot;&gt;Steps:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-family: Arial;&quot;&gt;Here&amp;nbsp;&lt;b&gt;n&amp;nbsp;&lt;/b&gt;is length of array and&amp;nbsp;&lt;b&gt;r&amp;nbsp;&lt;/b&gt;is
number of left rotation of array.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-family: Arial;&quot;&gt;- Store the first array element in temp variable.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;- Shift the array elements on left side
by&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;for(i=0; i&amp;lt;n-1; i++){
   arr[i] = arr[i+1];
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;- Then assign the temp value to arr[n-1]&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;- Repeat above steps r times.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java
Program to Left Rotation of Array&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
public class LeftRotation{
 public static void main(String[] args){
  int temp, i, r, j, n;
  Scanner sc = new Scanner(System.in);
  System.out.print(&quot;Enter Length of Array: &quot;);
  n = sc.nextInt();
  System.out.print(&quot;Enter Number of Left Rotation Array: &quot;);
  r = sc.nextInt();
  int[] arr = new int[n];
  System.out.print(&quot;Enter Array Elements: &quot;);
  for(i=0; i&amp;lt;n; i++)
   arr[i] = sc.nextInt();
  for(j=0; j&amp;lt;r;j++){
   temp = arr[0];
   for(i=0; i&amp;lt;n-1; i++){
    arr[i] = arr[i+1];
   }
   arr[n-1]=temp;
  }
  System.out.print(&quot;Elements are &quot;);
  
  for(int a:arr){
  System.out.print(a+&quot; &quot;);
  }
  
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter Length of Array: 5
Enter Number of Left Rotation Array: 3
Enter Array Elements: 1 2 3 4 5
Elements are 4 5 1 2 3&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/9076035440047565173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/left-rotation-of-array-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/9076035440047565173'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/9076035440047565173'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/11/left-rotation-of-array-in-java.html' title='Left Rotation of Array in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-4901893573524725292</id><published>2017-10-28T23:28:00.001-07:00</published><updated>2017-10-28T23:29:02.182-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Scanner class"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Scanner Class With Examples"/><category scheme="http://www.blogger.com/atom/ns#" term="Java.util.Scanner Class"/><category scheme="http://www.blogger.com/atom/ns#" term="Scanner Class in Java"/><title type='text'>Scanner Class in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;Scanner class is used to read input from keyboard. Scanner is class in
java.util package. Scanner class provides many methods to read and parse
primitive values. Scanner breaks the input into tokens using delimiter which is
by default whitespaces.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 13.5pt;&quot;&gt;To read input from keyboard, we have to make an object of Scanner class
by passing predefined object called System.in.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Scanner sc = new Scanner(System.in);&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Here sc is object of Scanner class and System.in represents
the standard input stream.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;
In java.util package, Scanner class extends Object class and
implements&amp;nbsp;Iterator and Closeable interfaces.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Methods in Scanner Class&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;
There are many methods in Scanner class but most commonly used methods are:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;1. next()&amp;nbsp;is used to take single
word input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;2. nextInt() is used to take integer
input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;3. nextFloat() is used to take float
input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;4. nextDouble()&amp;nbsp;is used to take
double&amp;nbsp;input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;5. nextLong()&amp;nbsp;is used to take long&amp;nbsp;input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;6. nextShort()&amp;nbsp;is used to take
short&amp;nbsp;input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;7. nextLine() is used to take string
input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;8. nextBoolean() is used to take boolean
input&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;next().charAt(0). is used to read a single
character.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Example of Java Scanner Class&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
class ScannerExample{
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);

  System.out.print(&quot;Enter a String : &quot;);
  String s = sc.nextLine();
  System.out.println(&quot;You have entered &quot;+s);

  System.out.print(&quot;\nEnter Integer Value : &quot;);
  int a = sc.nextInt();
  System.out.println(&quot;You have entered &quot;+a);

  System.out.print(&quot;\nEnter Character Value : &quot;);
  char c = sc.next().charAt(0);
  System.out.println(&quot;You have entered &quot;+c);
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter a String : Java
You have entered Java

Enter Integer Value : 10
You have entered 10

Enter Character Value : B
You have entered B&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/4901893573524725292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/scanner-class-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4901893573524725292'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/4901893573524725292'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/scanner-class-in-java.html' title='Scanner Class in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-7828497003970901347</id><published>2017-10-26T05:35:00.000-07:00</published><updated>2017-10-26T05:35:08.970-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java and Multiple Inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="java multiple inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Inheritance in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Multiple inheritance on Java interfaces"/><title type='text'>Multiple Inheritance in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Multiple inheritance&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;is a concept of object oriented programming. In multiple
inheritance, a class inherits the properties of two or more class. But java
does not support multiple inheritance because of some issues. When both parent classes
overrides the same method and child class object is calling that method, then
compiler does not know which class method is to be called and which class to
give high priority.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqkYT3HwrzMKNp_BuIzyFV40cA_JtuZARNJsN_mQD8XUY_zz9NrV4gV8ay2iTAI4t5hbXJezH6YfZrxR64ZmVnNDfo9Ht0KSaoLzAwscJ-yo2nMM-YEPlTnFhtjVKn_-5_xVvWRP2soyLl/s1600/multiple+inheritance+in+java.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Multiple Inheritance&quot; border=&quot;0&quot; data-original-height=&quot;260&quot; data-original-width=&quot;274&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqkYT3HwrzMKNp_BuIzyFV40cA_JtuZARNJsN_mQD8XUY_zz9NrV4gV8ay2iTAI4t5hbXJezH6YfZrxR64ZmVnNDfo9Ht0KSaoLzAwscJ-yo2nMM-YEPlTnFhtjVKn_-5_xVvWRP2soyLl/s1600/multiple+inheritance+in+java.png&quot; title=&quot;Multiple Inheritance&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Multiple Inheritance&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;It will show error because one class trying to extending two
classes.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;// First Parent class
class ParentClass1
{
    void show()
    {
        System.out.println(&quot;ParentClass1&quot;);
    }
}
 
// Second Parent Class
class ParentClass2
{
    void show()
    {
        System.out.println(&quot;ParentClass2&quot;);
    }
}
class SubClass extends ParentClass1, ParentClass2{
 public static void main(String[] args) {
  SubClass obj = new SubClass();

  obj.show();
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;SubClass.java:18: error: &#39;{&#39; expected
class SubClass extends ParentClass1, ParentClass2{
                                   ^
1 error&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Multiple Inheritance&amp;nbsp;by Interfaces&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In java, one class can implements two or interfaces. This also
does not cause any ambiguity because all methods declared in interfaces are
implemented in class.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;interface Interface1
{
   public void show();
}
interface Interface2
{
   public void show();
}
class SubClass implements Interface1, Interface2
{
   public void show()
   {
       System.out.println(&quot;A class can implements more than one interfaces&quot;);
   }
   public static void main(String args[]){
    SubClass obj = new SubClass();
    obj.show();
   }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;A class can implements more than one interfaces&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/7828497003970901347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/multiple-inheritance-in-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7828497003970901347'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/7828497003970901347'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/multiple-inheritance-in-java.html' title='Multiple Inheritance in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqkYT3HwrzMKNp_BuIzyFV40cA_JtuZARNJsN_mQD8XUY_zz9NrV4gV8ay2iTAI4t5hbXJezH6YfZrxR64ZmVnNDfo9Ht0KSaoLzAwscJ-yo2nMM-YEPlTnFhtjVKn_-5_xVvWRP2soyLl/s72-c/multiple+inheritance+in+java.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-6510626407081371910</id><published>2017-10-22T06:53:00.001-07:00</published><updated>2017-10-22T06:53:52.344-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="application layer functions"/><category scheme="http://www.blogger.com/atom/ns#" term="application layer of osi model"/><category scheme="http://www.blogger.com/atom/ns#" term="OSI Model Application Layer"/><category scheme="http://www.blogger.com/atom/ns#" term="OSI Model: Application Layer and its Functions"/><category scheme="http://www.blogger.com/atom/ns#" term="What is the Application Layer"/><title type='text'>OSI Model: Application Layer and its Functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In OSI model,&amp;nbsp;&lt;b&gt;&lt;i&gt;application layer&lt;/i&gt;&lt;/b&gt;&amp;nbsp;is
the top most layer. The application layer user interface to enable user to
access the network, user may be either human or software. Application layer
contains communication protocols and interface to perform process to process
communication on network.&amp;nbsp;&amp;nbsp;Application layer acts as the user
interface responsible for displaying received information to the user.
Application layer supports many services such as electronic mail, remote file
access and transfer, shared database system,&amp;nbsp;directory services, network
resource etc.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Functions of Application Layer&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Network Virtual Terminal:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Network virtual terminal allows user to log on to a remote
host.&amp;nbsp;Application creates a software emulation of a terminal at the remote
host.&amp;nbsp;User communicates with the software terminal which in turn
communicates with the host and vice versa.&amp;nbsp;The remote host assumes that it
is communicating with one of its own terminals and allows user to log on.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;File
Transfer, Access and Management:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;The application layer
allow user to access files in a remote host. User can make changes in files and
read data from the file.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Mail Services:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;The
application layer provides services like E-mail forwarding and storage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Directory
Services:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;It provides distributed database sources and access for
global information about various services.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/6510626407081371910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/osi-model-application-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6510626407081371910'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6510626407081371910'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/osi-model-application-layer.html' title='OSI Model: Application Layer and its Functions'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-641578767852797873</id><published>2017-10-20T06:59:00.001-07:00</published><updated>2017-10-20T06:59:08.975-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to write java program in notepad and run"/><category scheme="http://www.blogger.com/atom/ns#" term="java code to open a text file"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Open Notepad"/><category scheme="http://www.blogger.com/atom/ns#" term="notepad program in java source code"/><title type='text'>Java Program to Open Notepad</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;This&amp;nbsp;&lt;b&gt;&lt;i&gt;java program opens notepad&lt;/i&gt;&lt;/b&gt;&amp;nbsp;by
Runtime class. Notepad is an application&amp;nbsp;comes with Windows operating
system. Notepad is text editor. In this program, we create an object of Runtime
class and calling exec() method by passing parameter as application name.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java Program to Open Notepad&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.*;
import java.io.*;
 
class OpenNotepad {
  public static void main(String[] args) {
   System.out.println(&quot;Opening Notepad...&quot;);
    Runtime rt = Runtime.getRuntime();
 
    try {
      rt.exec(&quot;notepad&quot;);
    }
    catch (IOException e) {
      System.out.println(e);
    }   
  }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Opening Notepad...&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh6scmeJodZtf5b0lrr_iFoLCozY43XbzOzS90HtInvq0t_LpQg7tDADhYYp_7JugpLr8ADd1-fgTWWs96v_0aUXacWwE1EnDSrfOCvdOSS6kEQuN1BNgfCD8fKY_-cqKbnBpA6P1mw0y/s1600/Notepad.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Java Program to Open Notepad&quot; border=&quot;0&quot; data-original-height=&quot;574&quot; data-original-width=&quot;900&quot; height=&quot;408&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh6scmeJodZtf5b0lrr_iFoLCozY43XbzOzS90HtInvq0t_LpQg7tDADhYYp_7JugpLr8ADd1-fgTWWs96v_0aUXacWwE1EnDSrfOCvdOSS6kEQuN1BNgfCD8fKY_-cqKbnBpA6P1mw0y/s640/Notepad.png&quot; title=&quot;Java Program to Open Notepad&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Notepad&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/641578767852797873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-open-notepad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/641578767852797873'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/641578767852797873'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-open-notepad.html' title='Java Program to Open Notepad'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDh6scmeJodZtf5b0lrr_iFoLCozY43XbzOzS90HtInvq0t_LpQg7tDADhYYp_7JugpLr8ADd1-fgTWWs96v_0aUXacWwE1EnDSrfOCvdOSS6kEQuN1BNgfCD8fKY_-cqKbnBpA6P1mw0y/s72-c/Notepad.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-5951674140881693142</id><published>2017-10-18T07:02:00.000-07:00</published><updated>2017-10-18T07:02:56.300-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dynamic binding in java"/><category scheme="http://www.blogger.com/atom/ns#" term="Static and dynamic binding in java"/><category scheme="http://www.blogger.com/atom/ns#" term="Static binding in java"/><title type='text'>Static and Dynamic Binding in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Binding is the association of method call to method body.
Binding can be done at compile time and run time. Compile time binding is
known as static binding and run time binding is known as dynamic binding.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Static Binding&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;In static binding, method call is associated with method
body at the compile time. When we overload methods, it is important to resolve
binding. In case of overloaded methods, binding is resolved at compile time.
But we override method, binding cannot be resolved at compile time. Static
binding uses only Type information for binding. Binding of methods such as
static, private and final is always static binding. Because&amp;nbsp;static,
private and final&amp;nbsp;methods cannot be overridden, so they can be only called
by object of local class (static method&amp;nbsp;is called by class name). So,
binding of&amp;nbsp;static, private and final&amp;nbsp;method needs only Type
information.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Example&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class ParentClass{
    static void show(){
        System.out.println(&quot;Parent Class&quot;);
    }
}
public class ChildClass extends ParentClass {
    static void show(){
        System.out.println(&quot;Child Class&quot;);
    }
    public static void main(String[] args){
        ParentClass obj1 = new ChildClass();
        ParentClass obj2 = new ParentClass();
        obj1.show();
        obj2.show();
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Parent Class
Parent Class&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Dynamic Binding&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Dynamic binding is done at run time.
When both parent class and child class defines the same method, in this case
object type determines which method to call. And type of object is determined
at run time. So, binding of overridden methods is always a dynamic binding.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;class ParentClass{
    void show(){
        System.out.println(&quot;Parent Class&quot;);
    }
}
public class ChildClass extends ParentClass {
    void show(){
        System.out.println(&quot;Child Class&quot;);
    }
    public static void main(String[] args){
        ParentClass obj1 = new ChildClass();
        ParentClass obj2 = new ParentClass();
        obj1.show();
        obj2.show();
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Child Class
Parent Class&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/5951674140881693142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/static-and-dynamic-binding-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5951674140881693142'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/5951674140881693142'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/static-and-dynamic-binding-in-java.html' title='Static and Dynamic Binding in Java'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-8324383237555218126</id><published>2017-10-14T06:53:00.003-07:00</published><updated>2017-10-14T06:54:46.091-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Find Largest Number Among Three Numbers"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Find the Largest of Three Numbers"/><title type='text'>Java Program to Find the Largest of Three Numbers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;In this
article we&#39;ll see how to find largest of three numbers in java.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;We will see,&amp;nbsp;Java program to find the largest of three
numbers using&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;(1)&amp;nbsp;If-Else..If Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;(2)&amp;nbsp;Nested If..Else Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Example 1: Java Program to Find the Largest of Three Numbers
Using If-Else..If Statement&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
public class LargestOf3{

    public static void main(String[] args) {

        int a, b, c;
        Scanner read = new Scanner(System.in);
        System.out.print(&quot;Enter Three Numbers: &quot;);
        a = read.nextInt();
        b = read.nextInt();
        c = read.nextInt();
        
        if( a &amp;gt;= b &amp;amp;&amp;amp; a &amp;gt;= c)
            System.out.println(a + &quot; is the largest number.&quot;);

        else if (b &amp;gt;= a &amp;amp;&amp;amp; b &amp;gt;= c)
            System.out.println(b + &quot; is the largest number.&quot;);

        else
            System.out.println(c + &quot; is the largest number.&quot;);
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;

&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter Three Numbers: 10 20 30
30 is the largest number.&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Example 2: Java Program to Find the Largest of Three Numbers
Using Nested If..Else Statement&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
public class LargestOf3{

    public static void main(String[] args) {

        int a, b, c;
        Scanner read = new Scanner(System.in);
        System.out.print(&quot;Enter Three Numbers: &quot;);
        a = read.nextInt();
        b = read.nextInt();
        c = read.nextInt();

        if(a &amp;gt;= b) {
            if(a &amp;gt;= c)
                System.out.println(a + &quot; is the largest number.&quot;);
            else
                System.out.println(c + &quot; is the largest number.&quot;);
        }
        else {
            if(b &amp;gt;= c)
                System.out.println(b + &quot; is the largest number.&quot;);
            else
                System.out.println(c + &quot; is the largest number.&quot;);
        }
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter Three Numbers: -10 0 10
10 is the largest number.&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/8324383237555218126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-find-largest-of-three-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/8324383237555218126'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/8324383237555218126'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-find-largest-of-three-numbers.html' title='Java Program to Find the Largest of Three Numbers'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-686969159829838616</id><published>2017-10-12T05:52:00.000-07:00</published><updated>2017-10-12T05:52:55.074-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Add Two Matrices"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Add Two Matrix Using Multi-dimensional Arrays"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Program to Add Two MXN Matrix from User Input"/><category scheme="http://www.blogger.com/atom/ns#" term="Matrix Addition Example Java Program"/><title type='text'>Java Program to Add Two Matrices</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;This&amp;nbsp;&lt;b&gt;&lt;i&gt;java
program adds two matrices&lt;/i&gt;&lt;/b&gt;. First, user enters elements of two matrices,
then addition of both matrices is performed using for loop. Finally sum of both
matrices is displayed on the screen.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 18pt;&quot;&gt;Java Program to Add Two Matrices&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;import java.util.Scanner;
class AddMatrices
{
 public static void main(String[] args) {
 int a[][] = new int[3][3];
        int b[][] = new int[3][3];
        int c[][] = new int[3][3];
 int i, j;
 Scanner read = new Scanner(System.in);
 System.out.print(&quot;Enter the elements of matrix1: &quot;);
 for(i = 0; i&amp;lt;a.length; i++)
 for (j = 0; j&amp;lt;a.length; j++) {
  a[i][j] = read.nextInt();
 }

 System.out.print(&quot;\nEnter the elements of matrix2: &quot;);
 for(i = 0; i&amp;lt;b.length; i++)
  for (j = 0; j&amp;lt;b.length; j++) {
   b[i][j] = read.nextInt();
  }

 System.out.println(&quot;\nAdding matrix1 and matrix2...&quot;);
 for(i = 0; i&amp;lt;b.length; i++)
  for (j = 0; j&amp;lt;b.length; j++) {
   c[i][j] = a[i][j] + b[i][j];
  }

 System.out.println(&quot;\nSum of matrix1 and matrix2 is:&quot;);
 for(i = 0; i&amp;lt;c.length; i++){
                for(j = 0; j&amp;lt;c.length; j++){
                        System.out.print(c[i][j]+ &quot;\t&quot;);
                }
                System.out.println();
        }
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 13.5pt;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Enter the elements of matrix1: 1
2
3
4
5
6
7
8
9

Enter the elements of matrix2: 1
2
3
4
5
6
7
8
9

Adding matrix1 and matrix2...

Sum of matrix1 and matrix2 is:
2       4       6
8       10      12
14      16      18&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/686969159829838616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-add-two-matrices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/686969159829838616'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/686969159829838616'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-program-to-add-two-matrices.html' title='Java Program to Add Two Matrices'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-6716055536377985843</id><published>2017-10-10T05:47:00.002-07:00</published><updated>2017-10-10T05:54:13.301-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Functions of Presentation Layer"/><category scheme="http://www.blogger.com/atom/ns#" term="Presentation Layer"/><category scheme="http://www.blogger.com/atom/ns#" term="Presentation Layer of OSI Model"/><category scheme="http://www.blogger.com/atom/ns#" term="what is Presentation layer"/><title type='text'>OSI Model: Presentation Layer and its Functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Presentation
layer&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&amp;nbsp;is layer 6 of OSI model. Presentation layer concern about
the syntax and semantics of information exchanged between systems. Presentation
layer is also known as data translate because it translates the data in such a
way the receiver will understand the data. After formatting the data,
presentation layer passes data to the application layer for further processing
and display. There are many other important functions of presentation layer.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Functions of Presentation Layer&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Translation:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Communicating systems exchange
information of different formats such as string, numbers and so on.
Presentation layer converts this information into bit stream before
transmitting. The presentation layer on receiver converts these data into
receiver-dependent format.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Encryption:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;To ensure privacy, presentation
layer perform encryption at transmitter side and decryption at the receiver
side.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Compression:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;The presentation layer performs
compression to reduce the bits contained in the information. It reduces the
bandwidth of information. Compression is important for transmitting multimedia
such as text, audio and video.&lt;/span&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/6716055536377985843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/osi-model-presentation-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6716055536377985843'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/6716055536377985843'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/osi-model-presentation-layer.html' title='OSI Model: Presentation Layer and its Functions'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4415873721742255009.post-655982277155644496</id><published>2017-10-08T05:52:00.000-07:00</published><updated>2017-10-08T05:54:07.035-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="array in java"/><category scheme="http://www.blogger.com/atom/ns#" term="java array"/><category scheme="http://www.blogger.com/atom/ns#" term="java array initialization"/><category scheme="http://www.blogger.com/atom/ns#" term="java multidimensional array"/><category scheme="http://www.blogger.com/atom/ns#" term="java Single Dimensional Array"/><category scheme="http://www.blogger.com/atom/ns#" term="types of array in java"/><title type='text'>Java Array (With Examples)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;An&amp;nbsp;&lt;b&gt;array&amp;nbsp;&lt;/b&gt;is a data structure, which stores
related data items. An array is a group of contiguous data items that shares a
common name. If we need a set of variables to store same type of data, instead
of defining many variables, we can simply define an array. The individual value
in array is known as element.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Advantage of Java Array&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- Provides ability to develop concise and efficient program.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- It provides random access. We can access any data at any
index.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Disadvantage of Java Array&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- We need to know in advance the size of array.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- The memory allocated to array can not be increased or
decreased dynamically.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Types of Java Array&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- Single Dimensional Array&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;- Multi-Dimensional Array&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Single Dimensional Array&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;A single dimensional array is array in which list of items
is stored under a single name using one subscript.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Declaration of Single Dimensional Array&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Syntax:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;datatype[] array-name;
or
datatype array-name[];&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;int[ ] arr;
char [ ]arr;
short arr[ ];&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Instantiation
of Java Array&lt;/span&gt;&lt;span style=&quot;font-size: 18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 20.7px;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 20.7px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;float []arr = new float[20];&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Accessing Array Element&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Array index start from 0. We can access
array element using indexes.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Syntax:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;array-name[n-1];&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;float[] arr = {1.1, 2.2, 3.3, 4.4, 5.5};&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;If we want to access the 5th element of above array. Then we
write following code.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;System.out.println(&quot;Value of 5th Element is &quot; + arr[4]);&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Example of Single Dimensional Java Array&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;In this java program, we declare, instantiate and access
single dimensional array.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;public class OneDArray{
 public static void main(String[] args) {
  int[] arr; //Declaration
  arr = new int[5]; //Instantiation
  arr[0] = 10;
  arr[1] = 20;
  arr[2] = 30;
  arr[3] = 40;
  arr[4] = 50;

  for(int i = 0; i&amp;lt;arr.length; i++)
   System.out.println(&quot;Value of Element&quot;+i+&quot; is &quot;+arr[i]);
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;Value of Element0 is 10
Value of Element1 is 20
Value of Element2 is 30
Value of Element3 is 40
Value of Element4 is 50&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Multi-Dimensional Array&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;A multi-dimensional array can have multiple rows and
multiple columns.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Declaration of Multi-Dimensional Array&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;Syntax:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;dataType[][] array-name; or   
dataType array-name[][]; or  
dataType []array-name[];&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Instantiation of&amp;nbsp;Multi-Dimensional Array&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;int[][] arr=new int[5][5]; 
float array-name[5][5]; or  
char [5]array-name[5];&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 18pt;&quot;&gt;Initialization of Multi-Dimensional Array&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;arr[0][0]=1;  
arr[0][1]=2;  
arr[0][2]=3;  
arr[0][3]=4;  
arr[0][4]=5;  &lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: large;&quot;&gt;Example of Multi-Dimensional java array&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #1e2a37; color: #cccccc; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;public class MultiDArray{
 public static void main(String[] args) {
  int[][] arr = new int[3][3]; //Declaring and Instantiating
  arr[0][0]=1;  //Initializing
  arr[0][1]=2;  
  arr[0][2]=3;  
  arr[1][0]=4;  
  arr[1][1]=5;  
  arr[1][2]=6;  
  arr[2][0]=7;  
  arr[2][1]=8;  
  arr[2][2]=9; 
  for (int i = 0; i&amp;lt;arr.length ; i++) {
   for (int j = 0; j&amp;lt;arr.length; j++) {
    System.out.print(arr[i][j]+&quot;\t&quot;);
   }
   System.out.println();
  }
 }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 13.5pt; line-height: 115%;&quot;&gt;Output:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: lightgrey; color: black; font-size: 18px; overflow: auto; padding: 6px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;1       2       3
4       5       6
7       8       9&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://pctechnicalpro.blogspot.com/feeds/655982277155644496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-array-with-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/655982277155644496'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4415873721742255009/posts/default/655982277155644496'/><link rel='alternate' type='text/html' href='https://pctechnicalpro.blogspot.com/2017/10/java-array-with-examples.html' title='Java Array (With Examples)'/><author><name>pctechnicalpro.</name><uri>http://www.blogger.com/profile/07142181989374967832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>