Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Newest | ||||
| ||||
Ans. Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system. Its called Byte Code because each instruction is of 1-2 bytes. Sample instructions in Byte Code - 1: istore_1 2: iload_1 3: sipush 1000 6: if_icmpge 44 9: iconst_2 10: istore_2 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   interpreter   platform independent   byte code | ||||
| ||||
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ). | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   path   classpath   byte code   jvm   basic interview question Asked in 3 Companies intermediate   rare | ||||
| ||||
Ans. No, Java runs on a virtual machine called JVM and hence doesn't embed well with the underlying hardware. Though we can create a platform independent system software but that would be really slow and that's what we would never need. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   system software java   jvm   yes-no   yes no   java operating system   architecture | ||||
| ||||
Ans. OutOfMemoryError in Java is a subclass of VirtualMachineError and is thrown by JVM when it runs out of heap memory. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  outofmemoryerror   error   exceptions   jvm   java   heap memory   heap | ||||
Ans. JVM reads Source Code and generates Byte Code. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm | ||||
| ||||
Ans. 1. Issue with Jar and ClassPath Conflicts 2. Killing JVM will terminate all applications | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  JVM Asked in 1 Companies | ||||
| ||||
Ans. There is a Java system property "sun.arch.data.model" that can tell if JVM is 32 bit of 64 bit System.getProperty("sun.arch.data.model") can be used to get that property. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm intermediate   rare | ||||
| ||||
Ans. Using Runtime object. Runtime runtime = Runtime.getRuntime(); runtime.totalMemory(); runtime.freeMemory(); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  memory management   rare | ||||
Frequently asked in Alibaba (Based on 2 feedback) | ||||
| ||||
Ans. In Java JVM memory settings is done by use the arguments -Xms -Xmx. Use M or G after the numbers for indicating Megs and Gigs of bytes respectively. -Xms indicates the minimum and -Xmx the maximum. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  memory management  jvm best memory setting Asked in 1 Companies intermediate | ||||
| ||||
Ans. Shutdown hook is a thread that is invoked before the JVM is shut down. we can use it perform resource cleaning task. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  shutdown hook  jvm | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. Execution engine contains interpreter and JIT compiler, which covert byte code into machine code. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  execution engine  compiler Asked in 1 Companies | ||||
| ||||
Ans. JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is createdThe JVM performs following operation:Loads codeVerifies codeExecutes codeProvides runtime environment | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  memory management  jvm Asked in 3 Companies basic   frequent | ||||
| ||||
Ans. No without main method can not be executed it will throw an error illegal start of type. Main method is the entry point of application. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  compilation  main method Basic | ||||
| ||||
Ans. No, to run application, machine needs just a JRE (Java Runtime Environment) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  jdk Basic | ||||
| ||||
Ans. static members are stored in method area of heap objects are stored on heap object references are stored on stack local or method variables are stored on stack | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  memory management  stack  heap | ||||
| ||||
This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm | ||||
| ||||
This question was recently asked at 'Apcolite'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  memory management Asked in 1 Companies advanced | ||||