diff --git a/README.md b/README.md index 44d2220..92f23ec 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,23 @@ # Java Technical Interview Questions ## Java * What is the JVM? +*A virtual machine that enables a computer to run Java programs and compiles it to Java bytecode.* * Define code compilation? +*The conversion of a programming language or high level language into machine language that's easily undestood by the machine.* * What is a constuctor? +*A method that’s called when an instance of an object is created.* * What is the naming convention of variables in java? +*All variable names must begin with a letter, an underscore or a dollar sign.* * What is an annotation and give an example. -* What is the difference betwee '==' and equals() when comparing Strings? +*This is metadata used to provide data about a program that is not part of the program itself.* +* What is the difference between '==' and equals() when comparing Strings? +*The equals() method compares the "value" inside String instances even if the two objects references refer to the same String instance or not while '==' compares the value of two object references to see whether they refer to the same String instance.* * What are the 8 primitive types in Java? +*1. int 2. char 3. boolean 4. long 5. float 6. double 7. byte 8. short* * What is the difference between primitives and wrapper classes and when can we use each? +*Primitives dont belong to a class and therefore we cannot call methods on them but wrapper classes can be used to convert these primitives into objects that may now allow us to call methods on them. Wrapper classes can be used only when we want to call methods on primitives otherwise, use primitives.* * Define Encapsulation and outline its benefits. +*It is one of the four fundamental OOP concepts and is used for wrapping variables and methods together as a single unit. The advantage of this is that a class can have total control over what is stored in its fields.* * Do objects get passed by reference or value in Java? Elaborate on that. * Explain the four OOP principles. * What is the difference between Abstract classes and Interfaces? @@ -33,12 +42,16 @@ ## Web Development * What is the difference between a GET and POST request? +*Post submits data to be processed to the identified resource while GET requests / retrieves data from thespecified resource.* * What is a URI? +*URI stands for Uniform Resource Identifier and is used for identifying / locating resources using the URL.* * Differenciate between a client and host. * What is the difference between HTTP and HTTPS? +*HTTP stands for Hypertext Transfer Protocol and uses TCP (Transmission Control Protocol) over port 80 to send and receive data packets over the web while HTTPs is like a more secure version of HTTP that also uses TCP to send and receive data packets but over port 443 within a connection encrypted by Transport Layer Security (TLS).* * Point out these components(query, host, port, protocol, path ) in the following URL https://127.0.0.1:4200/login/a=bx?c * What is an Internet Protocol? ## Android * What are the four main components of an Android Application? +*1. Activities 2. Broadcast Receivers 3. Content Providers 4. Services* * What is the purpose of a package name? * What is the purpose of Android Virtual Device?