The answer is
BYTECODE.!
Bytecode it the key that makes Java language most secure and Portable.
When you compile your java program then on successful compilation , java compiler (javac) generates a class file with .class extension which contains the Bytecodes of your java program. Now the Bytecodes which are generated are secure and they can be run on any machine (portable) which has JVM.
No doubt Java is Platform Independent, but Java is JVM dependent.!
Actually , JVM is an interpreter for Bytecode.
The details of the JVM will differ from platform to platform, but all interpret the same Java Bytecode according to machine/platform.
The Bytecode which are generated by the compiler will be tested by the JVM on the execution of the program or we can say every Java Program is under the control of the JVM which checks the code on the runtime many times for viruses and any malicious.
The Bytecode generated by the compiler are also supported on any machine which has the JVM which makes Java a platform independent language.
The details of the JVM will differ from platform to platform, but all interpret the same Java Bytecode according to machine/platform.
The Bytecode which are generated by the compiler will be tested by the JVM on the execution of the program or we can say every Java Program is under the control of the JVM which checks the code on the runtime many times for viruses and any malicious.
The Bytecode generated by the compiler are also supported on any machine which has the JVM which makes Java a platform independent language.
What happens if Java Program were not compiled with Bytecodes?
If the Java Program were compile to native code (other than java language) , than different versions of the same program would have to exist for each type of CPU connected to the Internet. Thus, the interpretation of the bytecode is the easiest way to create truly portable programs.
Can Interpretation of Bytecodes makes the Execution Slower?
The answer is NO.!
Since, many old programming languages like C, C++ etc. only compiled (whole code conversion to machine code) or interpret (line by line conversion) the code on execution but this is not the case with Java language which first compile the source program to Bytecode and than interpret the code on execution. Now this interpretation of the Bytecode is very fast and which makes the Java is much faster language than any other.
These are the reasons which makes Java the most Secure and Portable language than any other language.
Hello Tarun, Is there any other points which makes java more secure ?
ReplyDeleteHello Badal, there are many other features too which makes java the most secure language than any other language yet but bytecodes is the main reason behind the java security.
Deleteother security features which you may have to take are:
1. Objects and methods declared as final cannot be changed or overridden.
2. Array Bounds are checked for all array accesses.
etc.
how java is secure from virus?? do u know??
ReplyDeleteJava is secure language it consists of a secure coding when u write a progrma in java you will give the code to a other person.The hardware which make with the help of java are secure hardware .As most hardware is made up with help of c/c++ and they must be hack because there operating system doesnot consist of security and java program consist of security in opratin system
Deletesooooooooo nice web development
ReplyDeleteThanks for sharing this informative blog..
ReplyDeleteJ2EE Training in Chennai
java byte code can be de-interpreted into source code ?
ReplyDeletei read ur post.it very informative.today i learn the why java language is secure
ReplyDeleteHi, the website contains the great knowledge. It is very worthy. And it covers all the modules in Java Programming Language. Anyway, thank you for your information.
ReplyDeleteSo why is C++ or even C still more faster than Java itself with the same specification machine and code task? :p
ReplyDeleteNice article & Thanks for sharing. Java is a very powerful programming language that is open source and based on OOP concept. I read one more article were i learn some more updates http://crbtech.in/Java-Training/makes-java-portable-programming-languages-like-c/
ReplyDeleteJava interview questions
ReplyDeleteYes java is secured and portable. Basically its the oops concept which make it more secured and portable. Thanks for sharing.
ReplyDeleteThanks for sharing this good blog.It's amazing blogJava Online Course
ReplyDeletenice article.thank you
ReplyDeletejavascodegeeks.net
That'sthe motive selling you acceptable study prior to designing. It is additionally doable to put in writing much better placing on this. Software Design
ReplyDeleteGreat blog The content is informative and engaging. The author's writing style is captivating. Visit my website to get best Information About Salesforce Marketing Cloud Training in Noida and mention Below Technologies.
ReplyDeleteSalesforce Marketing Cloud Training in Noida
Thanks for sharing such an amazing post.
ReplyDeleteRotator Cuff Injury Treatment in Surrey
Appreciate the insightful information. This simplified explanation of Java programming is student-friendly and beneficial. Java's rapid popularity is due to its demand in Artificial Intelligence, Machine Learning, Chat GPT, etc., solidifying its significant role in the IT field. Opting for a career in Full Stack Java is a favorable choice. Full Stack Development: Guide to Building Modern Web Applications
ReplyDelete