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. |
|
| ||||
Interview Questions and Answers - Order By Newest | ||||
| ||||
This question was recently asked at 'Horizon Solutions'.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 | ||||
| ||||
This question was recently asked at 'Horizon Solutions'.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 | ||||
| ||||
Ans. Loose Coupling Facilitates designing complex applications by making them modular. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  oops concepts  abstraction Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'datalake solutions'.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  string manipulation  code  coding Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'MST Solutions'.This question is still unanswered. Can you please provide an answer. | ||||
Sample Code for composition | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  composition  object oriented programming (oops)  oops concepts  oops concepts Asked in 1 Companies basic   frequent | ||||
| ||||
Ans. // Java code for serialization and deserialization // of a Java object import java.io.*; class Demo implements java.io.Serializable { public int a; public String b; // Default constructor public Demo(int a, String b) { this.a = a; this.b = b; } } class Test { public static void main(String[] args) { Demo object = new Demo(1, "geeksforgeeks"); String filename = "file.ser"; // Serialization try { //Saving of object in a file FileOutputStream file = new FileOutputStream(filename); ObjectOutputStream out = new ObjectOutputStream(file); // Method for serialization of object out.writeObject(object); out.close(); file.close(); System.out.println("Object has been serialized"); } catch(IOException ex) { System.out.println("IOException is caught"); } Demo object1 = null; // Deserialization try { // Reading the object from a file FileInputStream file = new FileInputStream(filename); ObjectInputStream in = new ObjectInputStream(file); // Method for deserialization of object object1 = (Demo)in.readObject(); in.close(); file.close(); System.out.println("Object has been deserialized "); System.out.println("a = " object1.a); System.out.println("b = " object1.b); } catch(IOException ex) { System.out.println("IOException is caught"); } catch(ClassNotFoundException ex) { System.out.println("ClassNotFoundException is caught"); } } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  serialization Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Spillman Technologies,Motorola Solutions'.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 2 Companies | ||||
| ||||
Ans. Possible Answer - Java Developer | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 5 Companies | ||||
| ||||
Ans. The most effective and acceptable reasons for leaving your current job should be positive e.g. moving forward in your life or career | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 21 Companies | ||||
| ||||
Ans. Will look into access logs to see if web application is getting any traffic. If not , then will inform the server support team. Will look into intermediary infrastructure , queues , streams etc to see if there is any choke or throttle there. If there is any throttle at any point, would make request for either debugging the cause or increasing the infrastructure. For ex - increasing shards in Kinesis. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Solution  Designing  Solutioning Asked in 2 Companies | ||||
| ||||
Ans. https://blog.timesunion.com/careers/the-10-most-important-personality-traits-for-career-success/633/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 32 Companies | ||||
| ||||
Ans. Assigning a value of one type to a variable of another type is known as Type Casting. Example : int x = 10; byte y = (byte)x; In Java, type casting is classified into two types, Widening Casting(Implicit) widening-type-conversion and Narrowing Casting (Explicitly done) narrowing-type-conversion. Widening or Automatic type converion - Automatic Type casting take place when,the two types are compatible and the target type is larger than the source type Example : public class Test { public static void main(String[] args) { int i = 100; long l = i; //no explicit type casting required float f = l;//no explicit type casting required System.out.println("Int value " i); System.out.println("Long value " l); System.out.println("Float value " f); } } Narrowing or Explicit type conversion - When you are assigning a larger type value to a variable of smaller type, then you need to perform explicit type casting. Example : public class Test{ public static void main(String[] args) { double d = 100.04; long l = (long)d; //explicit type casting required int i = (int)l;//explicit type casting required System.out.println("Double value " d); System.out.println("Long value " l); System.out.println("Int value " i); } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  typecasting  type casting Asked in 23 Companies | ||||
| ||||
This question was recently asked at 'Exterro,Equator Business Solutions'.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 2 Companies | ||||
| ||||
Ans. Layer 7 - Application Layer 6 - Presentation Layer 5 - Session Layer 4 - Transport Layer 3 - Network Layer 2 - Data Link Layer 1 - Physical | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 7 Companies | ||||
| ||||
Ans. import java.util.Random; public class OTPGenerator { public static void main(String[] args) { int otpLength = 4; String otp = generateOTP(otpLength); System.out.println("Generated OTP: " otp); } private static String generateOTP(int length) { StringBuilder otp = new StringBuilder(); Random random = new Random(); for (int i = 0; i < length; i ) { int digit = random.nextInt(10); otp.append(digit); } return otp.toString(); } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'BzzAgent'.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  Design  Security Asked in 1 Companies | ||||
| ||||
Ans. str.equals("") this statement will throw NullPointerException if str is null where as "".equals(str) works fine even if str is null | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  equals method Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Slalom'.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  solution  testing Asked in 1 Companies | ||||
| ||||
Ans. Yes an application can have configuration stored at multiple places. Factors that could facilitate such a design could be 1. Type of config information - We may have a case to store confidential information differently than other regular config value 2. Environment - We may like to have a base config ( defined in application package ) and then a different override mechanism in different environments. 3. Centralization - Sometime some configs need to be shared across application and hence centralized. 4. Testing - Testing against config may not be possible in some enviornments in certain cases and hence additional config store might be kept for testing purpose only. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Design  Solution | ||||
| ||||
Ans. We can keep them in config as encrypted values. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   | ||||
| ||||
This question was recently asked at 'GSpann Technologies, Motorola Solutions'.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 2 Companies | ||||
| ||||
This question was recently asked at 'Eurofins IT Solutions'.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 | ||||
| ||||
This question was recently asked at 'Yudiz Solutions'.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 | ||||
| ||||
This question was recently asked at 'Motorola Solutions,DXC Technology'.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 2 Companies | ||||
| ||||
Ans. SNMP or Simple Network Management protocol is an application layer protocol for exchanging management information between network devices. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 15 Companies | ||||
| ||||
This question was recently asked at 'Egen Solutions'.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 | ||||
| ||||
Ans. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation . Create a new stack by using one of the following options: Choose Create Stack. This is the only option if you have a currently running stack. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws cloud formation Asked in 1 Companies | ||||