Interview Questions and Answers - Order By Rating Q1381. How can we see running logs ? Unix
Ans. tail -f <LOG_FILE_NAME> Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q1382. What is the difference between grep, zgrep and egrep ? Unix
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  grep  zgrep  egrep Q1383. How would you stop a Thread in java ? Core Java
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   Q1384. What Parameter we need to specify while creating sockets ?
This question was recently asked at 'Symantec'.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   Asked in 1 Companies Q1385. Can the double checked locking fail on single processor system ?
Ans. There is no mapping of single ton with number of processor of the system. So double check locking will not fail depending on number of processor. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1386. Explain how Mark & Sweep is implemented in garbage collection. Core Java
This question was recently asked at 'Amazon'.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   Asked in 1 Companies Q1387. How do you make instance of an abstract class ? Core Java
Ans. By extending it to the derived class and thereby creating instance of derived class. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1388. Implement a sparse matrix Java class with a constructor, set and get method.
This question was recently asked at 'GuideWire'.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   Asked in 1 Companies Q1389. Given a String with some Code, Write a Parser to have proper indentation. Core Java
This question was recently asked at 'Facebook'.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   Asked in 1 Companies Q1390. Write a Program to find number of lines , words and characters in a File. Core Java
Ans. import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class FileUtility {
public static void main(String[] args) {
System.out.println(printFile("/home/userme/notes"));
}
private static int printFile(String filePath) {
int wordCount = 0;
try (BufferedReader br = new BufferedReader(new FileReader(filePath))) {
String line = null;
String[] wordsArray = null;
while ((line = br.readLine()) != null) {
wordsArray = line.split(" ");
wordCount = wordsArray.length;
}
} catch (IOException e) {
e.printStackTrace();
}
return wordCount;
}
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  code  coding Asked in 2 Companies Ans. Oracle having following types of joins these are also called 8i joins. There are:
1. Equi (or) Inner join
2. Non Equi join
3.Self join
4.Outer join
Oracle also support the 9i (or) ANSI standard joins.There are:
1.Inner join
2.Left outer join
3.Right outer join
4.Full outer join
5.Natural join Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql joins  sql Asked in 2 Companies Q1392. Why String is a class in Java ? Core Java
This question was recently asked at 'NIIT Technologies'.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   Asked in 1 Companies Q1393. How to consume services using Restful web services? Web Service
This question was recently asked at 'IBM'.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   Asked in 1 Companies Q1394. What is the use of @import annotation ?
Ans. @Import annotation in Spring allows you to load bean definitions from one or more another @Configuration files or Components. You might not want to configure all the beans in one configuration file. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1395. How to capture Screenshot when the testcases are failed? Testing
Ans. Using Listeners Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  testng  selenium Asked in 1 Companies Q1396. What is the use of put() method in Restful webservices ? Web Service
This question was recently asked at 'IBM'.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   Asked in 1 Companies Q1397. What is the use of Log4j ? Logging
This question was recently asked at 'IBM'.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   Asked in 1 Companies basic This question was recently asked at 'IBM EGL'.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   Asked in 1 Companies Q1399. What is the use of second level cache in Hibernate ? Hibernate
Ans. Second level cache is shared between sessions. Hibernate by default uses first level cache. Second level cache need to be configurd to use.
There are several second level cache e.g eh cache,jboss cache etc. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1400. Why do we need to specify import statement ? Don't you think Java could have been designed in such a way to automatically import everything that's in the class path ? Core Java
Ans. Java could design it in such a manner but would result in ambiguity if there are multiple files with the same name. The only way to get over it to show the message when you use any such class to provide explicit import with the package prefix. The other problem could be that Java might have to change the early import to Late import and check what's being used to decide what needs to be imported as otherwise you will see errors regarding the ambiguous imports with duplicate file name. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  import expert This question was recently asked at 'Nagarvision'.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  search  binary search Asked in 1 Companies basic   frequent Q1402. How can we make objects if the constructor is private ? Core Java
This question was recently asked at 'Nagravision'.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  constructor Asked in 1 Companies Q1403. How is RDBMS different from DBMS ? Database
This question was recently asked at 'LumenData'.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  database  rdbms  dbms  dbms vs rdbms Asked in 1 Companies basic 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   Q1405. What are the characteristics of the object ? Core Java
Ans. 1. State
Instance variable or member elements forms the object state.
2. Behavior
Member functions forms the object behavior
3. Identity
Every object has a unique identity within JVM through a unique Id. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  oops  oops concepts Q1406. Can we modify a list while iterating it ? Core Java
Ans. No,we cannot.I t will give concurrentModificationExceptin error. It can be resolved by using ConcurrentClasses like ConcurrentHashMap,CopyOnWriteArrayList,BlockingQueue etc which are fail-safe and wont give exception. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  collections  list  iterator Asked in 1 Companies basic Ans. You can have reserved capacity with AWS Lambda. This guarantees that this number of concurrent Lambdas are always available for that function. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda  aws ec2  aws computing  amazon cloud computing  amazon ec2 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  AWS  AWS Lambda  AWS EC2Ans. We have to complement it to AWS Gateway API. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  AWS Lambda  AWS Serverless  AWS Gateway Q1410. Can you explain the integration between API Gateway and Lambda if we wish to develop services using these tools. Amazon Web Services (AWS)
Ans. We can create API gateway and give the name of lambda function in order to be linked with lambda function, deploy the API and whenever request will be made from API it will directly be linked to lambda function to perform further process. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws api gateway  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda