Interview Question and Answers | Search Coding Interview Questions - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

   next 30
 Q261. How can we restrict CloudFront access to a particular Geography ?Amazon Web Services (AWS)
Ans. We can select the appropriate Price Class if that suits us.

We can do Geo Targeting by black listing / white listing certain geographies.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws cloudfront  amazon cloudfront


 Q262. What is the use case for "On Demand" EC2 ?Amazon Web Services (AWS)
Ans. If the computation required is Spiky and unpredictable.

If it's first time use.

If the lifespan of the application isn't known.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q263. What is the use case for "Spot" EC2 plan ?Amazon Web Services (AWS)
Ans. If the usage is non continuous and have flexible start and End Time. For ex - Analysis , Research , mining etc.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2 spot


 Q264. What are the different price options available for EC2 ?Amazon Web Services (AWS)
Ans. On Demand
Reserved
Spot
Dedicated Host

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q265. What EC2 configuration would you use if you have to use it for Bitcoin mining ?Amazon Web Services (AWS)
Ans. Keeping Low cost for processing , i would choose

Spot Price Plan
F1 or P3 Instance Type
Cold Hdd (SCI ) EBS Volume

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q266. Which AWS services would you use if you have find a cheapest solution for an analytics application ?Amazon Web Services (AWS)
Ans. Computation

Spot Price Plan
F1 or P3 Instance Type
Cold Hdd (SCI ) EBS Volume

Storage

S3-IA

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws computation  aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q267. Can a EC2 instance have multiple Security Groups ? Can a single security group be assigned to multiple Ec2 instances ? If either of them is true , doesn't it result in conflict ?Amazon Web Services (AWS)
Ans. We can assign multiple security groups to single instance and we can use single security group with multiple instances.

It never results in conflict as security groups only have allow rules and no deny rules. Multiple security groups for an instance results in union of all rules.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2  aws security group


 Q268. Can we deny access for particular IP using Security Groups ?Amazon Web Services (AWS)
Ans. No, We can do that through ACL

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws security group


 Q269. Difference between S3 and EFS ?Amazon Web Services (AWS)
Ans. S3 is object based whereas EFS is block based.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws s3  aws storage  amazon cloud storage  amazon s3  aws efs


 Q270. There is a server which is 90% full, I need to increase the space. How can I do it ?Server
Ans. Firstly ,we have removed old backup data from server after that we are checking which user consume high memory through df command.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     server  Amazon Web Service (AWS)  production support     Asked in 1 Companies


 Q271. What is an object's lock and which object's have locks?
Ans. An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have locks. A class's lock is acquired on the class's Class object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   scheduling   synchronizing


  Q272. What is JSON ?Json
Ans. JSON is "JavaScript Object Notation", primarily used for client-server or server-server communication. Its a much lighter and readable alternative to XML. JSON is language independent and is easily parse-able in all programming languages.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     json   markup language   client server communication     Asked in 26 Companies      basic        frequent

Try 2 Question(s) Test


 Q273.  What is the role of JSON.stringify ?Json
Ans.  JSON.stringify() turns an object into a JSON text and stores that JSON text in a string. 

So If we stringfy above notation , it will become

{"name":"xyz","gender":"male";"age":30}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     json   JSON.stringify      intermediate        rare


 Q274. When were Enums introduced in Java ?
Ans. Enums were introduced with java 5.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java5   enum

Try 1 Question(s) Test


 Q275. Which function is used to convert a JSON text into an object ?Json
Ans. eval

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     json   markup language


 Q276. Which data types are supported by JSON ?Json
Ans. Number
String
Boolean
Array
Object
null

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     json   markup language   client server communication


 Q277. What is an API ( Application Programming Interface ) ?
Ans. An API is a kind of technical contract which defines functionality that two parties must provide: a service provider (often called an implementation) and an application. an API simply defines services that a service provider (i.e., the implementation) makes available to applications.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   api   java      basic        frequent


 Q278. What is URL?
Java EE
Ans. URL is Uniform Resource Locator which is representation of HTTP address.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   http   internet   url      basic        rare


 Q279. What is HTTP ?Java EE
Ans. HTTP or Hypertext Transfer Protocol is internet protocol for tranmission of hypertext ( text with meta data ) over internet.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   http   internet  fidelity     Asked in 2 Companies      basic        frequent


 Q280. Is tomcat an application or Web server ?Server
Ans. Tomcat is a web server and a Servlet container. It is often used as an application server for web-based applications but does not include the complete suite of capabilities that a Java EE application server would supply.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     tomcat   j2ee   web server   application server   build management


 Q281. What are the default or implicitly assigned values for data types in java ?
Ans. boolean ---> false
byte ----> 0
short ----> 0
int -----> 0
long ------> 0l
char -----> /u0000
float ------> 0.0f
double ----> 0.0d
any object reference ----> null

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types   default values

Try 1 Question(s) Test


 Q282. Can I import same package/class twice? Will the JVM load the package twice at runtime?Core Java
Ans. One can import the same package or same class multiple times. Neither compiler nor JVM complains wil complain about it. And the JVM will internally load the class only once no matter how many times you import the same class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   import   jvm   advanced     Asked in 1 Companies      intermediate        rare


 Q283. Which access specifier can be used with Class ?Core Java
Ans. For top level class we can only use "public" and "default". We can use private with inner class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   class   access specifier   inner classes      basic        frequent


 Q284. What is meant by an "asynchronous event." Give some examples ?Operating System
Ans. An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running. It is not "synchronized" with the program.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   internet   web application   asynchronus   asynchronus communication   architecture     Asked in 1 Companies


 Q285. Give an Example of Annotations ?
Ans. Suppose that a software group traditionally starts the body of every class with comments providing important information:
public class Generation3List extends Generation2List {

// Author: John Doe
// Date: 3/17/2002
// Current revision: 6
// Last modified: 4/12/2004
// By: Jane Doe
// Reviewers: Alice, Bill, Cindy

// class code goes here

}
To add this same metadata with an annotation, you must first define the annotation type. The syntax for doing this is:
@interface ClassPreamble {
String author();
String date();
int currentRevision() default 1;
String lastModified() default "N/A";
String lastModifiedBy() default "N/A";
// Note use of array
String[] reviewers();
}
The annotation type definition looks similar to an interface definition where the keyword interface is preceded by the at sign (@) (@ = AT, as in annotation type). Annotation types are a form of interface, which will be covered in a later lesson. For the moment, you do not need to understand interfaces.
The body of the previous annotation definition contains annotation type element declarations, which look a lot like methods. Note that they can define optional default values.
After the annotation type is defined, you can use annotations of that type, with the values filled in, like this:
@ClassPreamble (
author = "John Doe",
date = "3/17/2002",
currentRevision = 6,
lastModified = "4/12/2004",
lastModifiedBy = "Jane Doe",
// Note array notation
reviewers = {"Alice", "Bob", "Cindy"}
)
public class Generation3List extends Generation2List {

// class code goes here

}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   annotations


 Q286. What are few of the Annotations pre defined by Java?
Ans. @Deprecated annotation indicates that the marked element is deprecated and should no longer be used. The compiler generates a warning whenever a program uses a method, class, or field with the @Deprecated annotation.

@Override annotation informs the compiler that the element is meant to override an element declared in a superclass.

@SuppressWarnings annotation tells the compiler to suppress specific warnings that it would otherwise generate.

@SafeVarargs annotation, when applied to a method or constructor, asserts that the code does not perform potentially unsafe operations on its varargsparameter. When this annotation type is used, unchecked warnings relating to varargs usage are suppressed.

@FunctionalInterface annotation, introduced in Java SE 8, indicates that the type declaration is intended to be a functional interface, as defined by the Java Language Specification.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   java8   annotations   pre defined annotations


 Q287. What are meta Annotations ?
Ans. Annotations that apply to other annotations are called meta-annotations.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   annotations   meta annotations


 Q288. Name few meta-annotations ?
Ans. @Retention annotation specifies how the marked annotation is stored:

@Documented annotation indicates that whenever the specified annotation is used those elements should be documented using the Javadoc tool. (By default, annotations are not included in Javadoc.)

@Target annotation marks another annotation to restrict what kind of Java elements the annotation can be applied to.

@Inherited annotation indicates that the annotation type can be inherited from the super class. (This is not true by default.) When the user queries the annotation type and the class has no annotation for this type, the class' superclass is queried for the annotation type. This annotation applies only to class declarations.

@Repeatable annotation, introduced in Java SE 8, indicates that the marked annotation can be applied more than once to the same declaration or type use. For more information, see Repeating Annotations.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   java8   annotations   meta annotations


 Q289. How to display and set the Class path in Unix ?
Ans. To display the current CLASSPATH variable, use these commands in UNIX (Bourne shell):

% echo $CLASSPATH

To delete the current contents of the CLASSPATH variable,

In UNIX: % unset CLASSPATH; export CLASSPATH

To set the CLASSPATH variable,

In UNIX: % CLASSPATH=/home/george/java/classes; export CLASSPATH

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     unix   unix commands   classpath


 Q290. Different ways of implementing Threads in Java ?Core Java
Ans. Threads in Java can be implement either by Extending Thread class or implementing runnable interface.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading     Asked in 1 Companies      basic        frequent


previous 30   next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: