Can any one help me in figuring out what compilers and interpreters are? And what their difference is ? Appreciate it if explained for Java beginner as I am one.
Interpreter and Compiler
126 Views Asked by Amanuel Getachew At
1
There are 1 best solutions below
Related Questions in INTERPRETER
- Reference: Crafting Interpreters. Print statement is not able to evaluate expression. Help me fix this (details below)
- Resolve shift/reduction conflict in grammar for expressions in PLY for calls to embedded functions
- Why I select inherit global site-packages on Pycharm, nothing happened?
- How to use menhir to parse into a GADT expression?
- PyCharm cannot create Interpreter in Python3
- When using a jupyter notebook in VSCode, the Python interpreter is ignored
- How to share lexical environment with recursive functions in a custom interpreter?
- How do I write an implicit cast for my strongly typed interpreter? (C++)
- 32bit and 64bit python interpreter in one project
- python subprocess calling the local interpreter instead of the linked one
- Handling out of reach environments when implementing an interpreter
- PyCharm: ModuleNotFoundError although module (scipy) is installed
- Matlab: Selectable text in EPS-figures when using latex interpreter and/or importing fonts
- Handling Tuple Values in Word Attributions for Transformers Interpret
- OpenJDK Tracking ReentrantLock lock and unlock
Related Questions in COMPILER-THEORY
- What is the point of the 4 grammars specified in Chomsky hierarchy?
- How does the latest ANTLR4 resolve the "dangling else" ambiguity?
- Why don't most interpreted languages like ruby provide an optional compiler?
- Print integers as strings in mips programs
- Exercise 4.2.8 from "Compilers - Principles, Techniques, & Tools" (a.k.a. Dragon Book)
- Eliminate Left Recursion in a Context Free Grammar
- What is Local and Global optimization in Compiler Design?
- Interpreter and Compiler
- Why can't compilers automatically optimize regular recursion?
- Computing Liveness of Arrays and Other Non-Scalars in Low Level Intermediate Code
- can I reduce executable file size by defining funtions in source code?
- How easy is to find a string that leads to conflict in a SLR(1) parser compared to a LR(1)
- Finding a grammar is not LL(1) without using classical methods and transforming it to LL(1)
- Is this an intermediate representation?
- Writing a Compiler in C
Related Questions in JAVA-COMPILER-API
- How to set the location that JavaCompiler executes from?
- Use transitive maven dependency in an annotation processor inside the maven-compiler-plugin using the ServiceLoader
- Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism at javax.crypto.JceSecurity in JavaCompiler API
- How to modify java bytecode after compilation using compiler plugins?
- Scan a super method definition from TreeScanner.visitMethodInvocation
- Issues with jar exporter tool
- How to copy a JarEntry to a directory
- Enable preview features for compiler plugin
- Compile another Maven project using Maven Compiler API (CompilerMojo)
- Project packages cannot import Java compiler API: ClassNotFoundException / NoClassDefFoundError
- How to include internal dependencies in a Maven project using JavaCompiler API?
- How to get parent tree object from JCTree in java?
- Facing NoClassDefFoundError despite jar being in classpath (dynamic compilation)
- JavaCompiler API in a Spring Boot app and get classpath
- How to validate Java code programatically?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Basically (very basically), a compiler build your program. It translates your java code into something the computer understands. An interpreter runs your program.
Both can catch errors but they are different types. Compilation errors can be syntax, semantic or logical errors. On the other hand, errors from your interpreter are only known once you run the program.
For example, if you have an array that contains 3 fruits like this:
And you try this:
The compiler won't get the error, because there are no syntax errors (everything seems fine at compile-time) but once you run the program, you'll get an
IndexOutOfBoundsExceptionwhich is aRuntimeExceptioncaught by the interpreter.