Javascript Interview Question
Categories: Java 8(JDK1.8) ||
How to create a function in JavaScript?To create a function in JavaScript, follow the following syntax.function function_name(){ //function body } What are
Categories: Java 8(JDK1.8) ||
How to create a function in JavaScript?To create a function in JavaScript, follow the following syntax.function function_name(){ //function body } What are
Categories: Java 8(JDK1.8) ||
How to write a hello world example of JavaScript?A simple example of JavaScript hello world is given below. You need to place it inside the body tag of HTML.<script type="text/javascript">
Categories: Java 8(JDK1.8) ||
What is JavaScript?JavaScript is a scripting language. It is different from Java language. It is object-based, lightweight, cross-platform translated language. It is widely used for client-side
Categories: Java 8(JDK1.8) ||
Which containers use a FlowLayout as their default layout?The Panel and Applet classes use the FlowLayout as their default layout.What are peerless components?The lightweight component of Swing is cal
Categories: Java 8(JDK1.8) ||
What is the purpose of using javap?The javap command disassembles a class file. The javap command displays information about the fields, constructors and methods present in a class file.Syntaxjavap fu
Categories: Java 8(JDK1.8) ||
What is the transient keyword?If you define any data member as transient, it will not be serialized. By determining transient keyword, the value of variable need not persist when it is restored.What i
Categories: Java 8(JDK1.8) ||
What is the purpose of the Runtime class?Java Runtime class is used to interact with a java runtime environment. Java Runtime class provides methods to execute a process, invoke GC, get total and free
Categories: Java 8(JDK1.8) ||
How many class files are created on compiling the OuterClass in the following program?public class Person { String name, age, address; class Employee{ float sal
Categories: Java 8(JDK1.8) ||
How many objects will be created in the following code?String s = new String("Welcome"); Two objects, one in string constant pool and other in non-pool(heap).What is the output of the follo
Categories: Java 8(JDK1.8) ||
What is the difference between throw and throws?throw keyword - throws keyword1) The throw keyword is used to throw an exception explicitly. - The throws keyword is used to declare an exception.2) The
Categories: Java 8(JDK1.8) ||
How can we access some class in another class in Java?There are two ways to access a class in another class.a) By using the fully qualified name: To access a class in a different package, either
Categories: Java 8(JDK1.8) ||
What is the interface?The interface is a blueprint for a class that has static constants and abstract methods. It can be used to achieve full abstraction and multiple inheritance. It is a mechanism to
Categories: Java 8(JDK1.8) ||
What is the difference between compile-time polymorphism and runtime polymorphism?There are the following differences between compile-time polymorphism and runtime polymorphism.SNcompile-time polymorp
Categories: Java 8(JDK1.8) ||
What is hash-collision in Hashtable and how it is handled in Java?Two different keys with the same hash value are known as hash-collision. Two separate entries will be kept in a single hash bucket to
Categories: Java 8(JDK1.8) ||
What is the difference between HashSet and HashMap?The differences between the HashSet and HashMap are listed below.a) HashSet contains only values whereas HashMap includes the entry (key, value). Has
Categories: Java 8(JDK1.8) ||
Define FutureTask class in Java?Java FutureTask class provides a base implementation of the Future interface. The result can only be obtained if the execution of one task is completed, and if the comp
Categories: Java 8(JDK1.8) ||
What are the main components of concurrency API?Concurrency API can be developed using the class and interfaces of java.util.Concurrent package. There are the following classes and interfaces in java.
Categories: Java 8(JDK1.8) ||
What is the purpose of the Synchronized block?The Synchronized block can be used to perform synchronization on any specific resource of the method. Only one thread at a time can execute on a particula
Categories: Java 8(JDK1.8) ||
Describe the purpose and working of sleep() method.The sleep() method in java is used to block a thread for a particular time, which means it pause the execution of a thread for a specific time. There
Categories: Java 8(JDK1.8) ||
Differentiate between process and thread?There are the following differences between the process and thread.a) A Program in the execution is called the process whereas; A thread is a subset of t
Categories: Java 8(JDK1.8) ||
What are the states in the lifecycle of a Thread?A thread can have one of the following states during its lifetime:New: In this state, a Thread class object is created using a new operator, but the th
Categories: Java 8(JDK1.8) ||
Can we declare a constructor as final?The constructor can never be declared as final because it is never inherited. Constructors are not ordinary methods; therefore, there is no sense to declare
Categories: Java 8(JDK1.8) ||
Can we change the scope of the overridden method in the subclass?Yes, we can change the scope of the overridden method in the subclass. However, we must notice that we cannot decrease the accessibilit
Categories: Java 8(JDK1.8) ||
What is object cloning?The object cloning is used to create the exact copy of an object. The clone() method of the Object class is used to clone an object. The java.lang.Cloneable interface must be im
Categories: Java 8(JDK1.8) ||
What is this keyword in java?The this keyword is a reference variable that refers to the current object. There are the various uses of this keyword in Java. It can be used to refer to current class pr
Categories: Node JS || MCQ ||
Node.js Quiz MCQ Questions with Answer part 2 Q1. What is the default scope in Node.js application. Local Public Private Global Answer: Local Q2. Which o
Categories: Node JS || MCQ ||
Node.js Quiz MCQ Questions with Answer 1. Node.js is _____ Language. Server Side Client-Side Both Answer: Server Side 2. Node.js is written in _____________.
Categories: Interview questions and answers || Freshers || Node JS ||
Node.js Interview Questions and Answer for freshers (set3) Q1. What is the framework that is used majorly in Node.js today? Answer: Node.js has multiple frameworks, namely:
Categories: Interview questions and answers || Freshers || Node JS ||
Node.js Interview Questions and Answer for freshers (set 2) Q1. What is the control flow function? Answer: The control flow function is a common code snippet, which executes whenever th
Categories: Interview questions and answers || Freshers || Node JS ||
Node.js Interview Questions and Answer for freshers Q1. What is Node.js? Answer: Node.js is a very popular scripting language that is primarily used for server-side scripting requiremen
Categories: Java 8(JDK1.8) ||
What are the main uses of the super keyword?There are the following uses of super keyword.a) super can be used to refer to the immediate parent class instance variable.b) super can be used to invoke t
Categories: Java 8(JDK1.8) ||
What is aggregation?Aggregation can be defined as the relationship between two classes where the aggregate class contains a reference to the class it owns. Aggregation is best described as a has
Categories: Java 8(JDK1.8) ||
How Many Type of the Inheritance?There are five types of inheritance in Java.a) Single-level inheritanceb) Multi-level inheritancec) Multiple Inheritanced) Hierarchical Inheritancee) Hybrid Inhe
Categories: Java 8(JDK1.8) ||
Can we assign the reference to this variable?No, this cannot be assigned to any value because it always points to the current class object and this is the final reference in Java. However, if we try t
Categories: Java 8(JDK1.8) ||
Can we make constructors static?As we know that the static context (method, block, or variable) belongs to the class, not the object. Since Constructors are invoked only when the object is created, th
Categories: Java 8(JDK1.8) ||
Can we override the static methods?No, we can't override static methods.What is the static block?Static block is used to initialize the static data member. It is executed before the main method, at th
Categories: Java 8(JDK1.8) ||
What is the output of the following Java program?class Test { int test_a, test_b; Test(int a, int b) { &nbs
Categories: Java 8(JDK1.8) ||
Is constructor inherited?No, The constructor is not inherited. Can you make a constructor final?No, the constructor can't be final.What do you understand by copy constructor in Java?There is no c
Categories: Java 8(JDK1.8) ||
What will be the initial value of an object reference which is defined as an instance variable?All object references are initialized to null in Java.What is the constructor?The constructor can be defi
Categories: Java 8(JDK1.8) ||
What is the output of the following Java program?class Test { public static void main (String args[]) { &n
Categories: Java 8(JDK1.8) ||
What is the default value of the local variables?The local variables are not initialized to any default value, neither primitives nor object references. What are the various access specifiers in
Categories: Java 8(JDK1.8) ||
What gives Java its 'write once and run anywhere' nature?The bytecode. Java compiler converts the Java programs into the class file (Byte Code) which is the intermediate language between source code a
Categories: Java 8(JDK1.8) ||
How many types of memory areas are allocated by JVM?Class(Method) Area: Class Area stores per-class structures such as the runtime constant pool, field, method data, and the code for methods.Heap: It
Categories: Java 8(JDK1.8) ||
What is Java?Java is the high-level, object-oriente, robust, secure programming language, platform-independent, high performance, Multithreaded, and portable programming language. It was developed by
Categories: C Programming language ||
Write a program to print factorial of given number using recursion?#include<stdio.h> #include<conio.h> long factorial(int n) &
Categories: C Programming language ||
Write a program to print "hello world" without using a semicolon?#include<stdio.h> void main(){ if(printf("hello world")){} // It prints t
Categories: C Programming language ||
What is the acronym for ANSI?The ANSI stands for " American National Standard Institute." It is an organization that maintains the broad range of disciplines including photographic film, computer lang
Categories: Intermediate class || MCQ || Accountancy ||
Reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 (set 3) Q1. The amount of goodwill is paid by new partner: for the payment of capital for sharing
Categories: Intermediate class || MCQ || Accountancy ||
Reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 set 2 Q1. In which ratio, the cash brought in for goodwill by the new partner is shared by the existing partners:
Categories: Intermediate class || MCQ || Accountancy ||
Accountancy reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 Q1. Goodwill is nothing more than probability that the old customer will resort to the old place. This d