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.
Ans. Static method is common to all instances of a class. Static methods are stored in the class memory. Whereas non-static methods are stored in the object memory. Each instance of a class will have their own copy of non-static methods.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Looping is used in programming to execute a statement or a block of statement repeatedly. There are three types of loops in Java:
1) For Loops
For loops are used in java to execute statements repeatedly for a given number of times. For loops are used when number of times to execute the statements is known to programmer.
2) While Loops
While loop is used when certain statements need to be executed repeatedly until a condition is fulfilled. In while loops, condition is checked first before execution of statements.
3) Do While Loops
Do While Loop is same as While loop with only difference that condition is checked after execution of block of statements. Hence in case of do while loop, statements are executed at least once.
Help us improve. Please let us know the company, where you were asked this question :
Ans. In java, float takes 4 bytes in memory while Double takes 8 bytes in memory. Float is single precision floating point decimal number while Double is double precision decimal number.
Help us improve. Please let us know the company, where you were asked this question :
Ans. An array groups data of same primitive type and is static in nature while vectors are dynamic in nature and can hold data of different data types.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Android is a stack of software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine.
Help us improve. Please let us know the company, where you were asked this question :
Ans. These frameworks facilitates easier product development and enhancement and maintainability by having separation of concerns ( using oops ) and helps in development of reusable libraries / components. So in nutshell , they make development and maintenance of large scale application easier.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Session Cookie, because session storage can be accessed from XSS (Cross site Scripting) attacks but cookies (if set with "HttpOnly" and "Secure" flags) are more safer against these attacks.
Help us improve. Please let us know the company, where you were asked this question :