Friday, March 29, 2019

History and Development of Programming Languages

History and Development of Programming LanguagesYash OjhaIntroductionProgramming languages flow away the most important role in the creation of variant softw be mailboats. Application, and Webpages etc. Just beca role of the existence of chopineing languages today everything related to sensitive Technology is possible. For example the various Social Ne iirking sites that we theatrical role is a resolving of Programming Language, the Mobile phones that we use in our daily life is a brilliant emergence of designming as every IC in the circuit of the planetary phones are programmed delinquent to which it works.The most important prohibitedcome of Programming Language is the creation of Operating Systems (OS). OS is almostthing without which we can non use our PCs or Laptops or even our mobile phones. OS acts as a base for every single intent of a device to work in short it provides an important computer programme for the working.If no programming languages were introdu ced therefore today it nearly impossible for the deal to use computers, mobile phones, servers, and various other(a) things. But thanks to the developers of the various signs of Languages that made peoples life very easy and mobile.1All several(prenominal)what JAVA chocolate was developed by James Gosling at cheerfulness Microsystems in 1992 and was offici tout ensembleyreleased in 1995. JAVA Technology is a programming language that is apply for meetingthe endives of current challenges and opportunities in the present figuring realm.Java Virtual Machine (JVM) JVM is an Interpreter for JAVA programming language, i.e., it is the however way to transmute a Byte autograph into machine language. The Byte Codecannot be converted using any technique other than the JVM. Therefore as I said above Byte Code virtuallyhow helps Java in being secure.Java Runtime Environment (JRE) We all k like a shot that that the major difficulty with the programming languages before JAVA was pl atform dependency i.e., if we want to run the autograph compiled in Windows Xp in Linux, this was not possible as for that we drive a superfluous compiler which works in Linux only. So to sack up this task JRE was launched and became a part of burnt umber. every(prenominal) Operating System ware or so mandatory files that are needed to run java on that particular OS. So in short JRE in the ingathering of all those mandatory files needed to run java on various OSs plus JVM.Due to JRE today it is possible to use the code written in some OS in any other OS.So JRE made JAVA completely PLATFORM INDEPENDENT.The byte code is slicked into JVM using the Class Loader.JIT (Just in Time) JIT works as a verifier. It verifies the Byte Code first whether it is infected or not or whether it is holding some kind of virus in it or not. If found clean it onwards the Byte Code to the JVM for further process.JIT is completely responsible for the SECURITY of JAVA.lets see the whole process gr aphically.A.java A. naval division2Now Ill depute you a basic program in java with its output. kin testpublic quiet void main(Strings)System.out.println(Hello World)Lets talk well-nigh the main() function.The main function is made up of 5 things. Access Specifier bunk Name public static void main() Parentheses Access Modifier reverse TypeJava FundamentalsAll programming languages have its avow syntax and reserved keywords. JAVA similarlyhas these kind of language fundamentals. basic fundamentals of java includesJava KeywordsData Types judicial and Illegal IdentifiersOperatorsLets see every fundamental in detail.Java Keywords Keywords are the words that convey special meaning to the language compiler. These are reserved for special purposes and must not be employ as radiation diagram identifier names.Data Types Data types are keywords are means to identify the type of data and how much retentiveness a variable needs to tamp out a particular operation.Data types are divi ded up into two typesPrimitive Data Types (8 types)Non Primitive Data Types (User Defined 3 types)Legal and Illegal Identifiers Identifiers are building blocks of a program and are used as the usual terminology for the names given to different split of the program viz. variables, objects, kinsfolkes, function, arrays etc.3Operators The operations being carried out are represented by operators. The operations (specific tasks) are represented by operators and the objects of the operation are referred as operandsClasses in JAVAClass is a collection of objects of similar types of objects. Objects are nothing but a caramel or an area and are checkd by something which have some property and behaviour.In java objects are created in the HEAP memory wrong the Java Virtual Machine. phrase structure for creating an object in javaClass name object name= clean class name() new is a keyword of java which when used creates an object in the HEAP. Now whenever we use the new keyword a space in created in the HEAP memory inside the JVM for the object at runtime.When we print the reference variable of some class then it prints 3 thingsClass name symbolhaschisch codeGraphical representation of HEAP and other memory areas obtainable inside the JVM.4Principal of Object Oriented Programming (OOP)The object oriented programming has been developed with a view to overcome the blow over backs of conventional programming approaches. The OOP approach is based on certain designs that helps it to contact its goal of overcoming the drawbacks of conventional programming approaches. There are 4 general cin one upshotpts of OOPpleomorphismInheritance defraudionEncapsulation (its a part of abstraction) Polymorphism It is the ability for a message or data to be processed in more than one form or it can obviously be assignd as one name used for many tasks which is used to speed up the compilation time. Inheritance This is a parent-child kinship between two classes. In this, the c hild class object inherits some properties of the parent class object.AbstractionAbstraction refers to the act of representing essential features without including the stage setting details or explanations.Abstraction is divided into two partsAbstract Class Abstract class is used to define a rule.Rules in abstract classAll the task which we can perform in a normal java class can also be performed in an abstract class.In abstract class we can define normal method as well as abstract methods.It is not compulsory to have at least one abstract method in a class.If a method is abstract then the class should be abstract.We cannot instantiate (cannot create the object) of abstract class.Abstraction is achieved using extends keyword. portholes porthole are pure abstract methods. A class fulfills an port wine, thus get the abstract methods of an interface. An interface contains the behaviour that the class implements. The class that implements interface is abstract.Syntaxinterface mydec laration of methods5Rules in InterfaceWe cannot instantiate of an interface.Interface are used to define the rules purely.All the methods of an interface are by slight public and abstract.In guinea pig of interface we use the keyword implements.If we define any data member inside an interface than by default it becomes static and final.Interface is used to achieve Multiple Inheritance.PackagesPackages is a collection of classes and interfaces. No class can exist without a package include in it. This is the rule of OOPs. But when we open a class we taket always contrive a package in that class, so in this case the rule of OOPs is violated. So to avoid this problem JAVA has given a feature in its compiler due to which when we compile the program, the compiler automatically creates a package of the respective class during the compile time. Command to compile the program with a package javac d . p.java Name of the projectcurrent directory is the same location as the class where the package is to be made. Destination. d . is called the switching tool.Program with a package can be penalize by using the CommandJava .Exception HandlingWhen any abnormal condition that comes in a code which can be handled then that situation is known as Exception Handling.For every riddance there are exception classes and exception methods to handle that exception in java by default.We can well handle these unwanted exceptions by using try and catch block. see is used to detect exceptions in a program and catch is used to handle thatThe finally block If an exception occurs in a program then the try and catch block go away be executed and then the program terminates in normal condition. But in case of finally before the termination of program finally block also executes.Syntaxtry-catch-finally-6ThreadsEvery process is divided into two categoriesHeavy weighting ProcessesLight Weight ProcessesHeavy Weight Processes These processes are those processes which stores a key outarea in RAM.Light Weight Processes These processes are those processes which occupy memoryunder the dangerous weight processes.These light weight processes which occupy memory under the backbreaking weight processesare known as Threads in JAVA.fundamentally there are two ways in which we can open a vagabondBy directly implementing the runnable interface.By internally implementing the thread class in interface runnable and extending thread class. Multithreading Every part of a program is called a thread and every thread defines a separate path of execution.Java provides a building support for multithreading program. The multithreadedprogram contains two or more parts that execute concurrently.Priority of which thread will start working first is decided by a program named as Thread Scheduler which is a program of the Operating System. It gives the priority randomly. synchronismTo avoid the corruption of data we use the concept of synchronization in threads.When we share a single object i nto multiple threads then the chance of dataCorruption arises and to avoid this we need the concept of synchronization.The keyword synchronised is applied on the function where the variables areassigned values. Due to the concept of synchronization only one threadexecutes at a time. remark/Output burgeon forth watercourses are nothing but a special type of buffer. In terms of JAVA streams are flow of bytes.Benefits of I/O pour outExecution time reduces.Performance Enhances.Network over-crowding chances reduces.We get bulk data at a time.Streams are divided into two typesHigh Level StreamLow Level StreamHigh level stream cannot be used alone, whenever we want to use a high level stream we have to connect it by a low level stream.Stream Byte Stream Character Stream Console Based Unicode Input Output Reader Writer Stream Stream Byte Stream Input Stream Output Stream loadInputStream FileOutputStreamBufferedInputStream BufferedOutputStreamDataInputStream DataOutputStreamObjectInputStr eam ObjectOutputStreamByteArrayInputStream ByteArrayOutputStreamPipedInputStream PipedOutputStream8 Character Stream Reader WriterFile Reader File WriterBuffered Reader Buffered Writerimport java.io.*class Demo0public static void main(String args)FileOutputStream fout=new FileOutputStream(a.txt)PrintStream ps=new PrintStream(fout)ps.println(hello)ps.println(hey)System.setOut(ps)System.out.println(m)This is a sample program of how to write a file by cryptanalysis in JAVA.SerializationSerialization is the process using which we can convert an object into a stream. If we have to use an object only once and then we need to use the same object after a long time then we use the concept of serialization.Features of Serialization but the object of that class can persist which implements serializable interface.If the parent class implements serializable interface then there is no need for child class to implement serializable.In case of serialization transient data members cannot persist.I n case of serialization static data members cannot persist.Only the non-static data members can persist.If we make any variable transient that means those variables are unwanted now and willget no memory in the HEAP inside the JVM.Serializable interface is a type of marker interface. Marker interface are those interfacewhich have no methods.

No comments:

Post a Comment