Interview Questions and Answers for 'Solution' | Search Interview Question - 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 - Order By Newest

   
 Q61. Which tools have you used in your previous projects ?General
 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


 Q62. What are your short and long terms goals ?General
 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


 Q63. What are the uses of Abstraction ?Core Java
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


 Q64. Suppose we have a string "Java is object oriented language" and we have to reverse every alternate word in string. How would we do that using Java program.Core Java
 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


 Q65. What is composition ?Core Java
 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


 Q66. Write code for serialization.Core Java
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


 Q67. Difference between Arrays and LinkedList ?Data Structure
 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


 Q68. What is your role in current project ?General
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


 Q69. Why do you want to leave your current job ?General
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


 Q70. While working on a web application, you are informed that there is no new data in Database for last few hours ? How would you go about debugging this problem ?
Solution
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


 Q71. What sets you apart from other developers ?

or

What are the distinguished qualities you have ?
General
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


 Q72. What is TypeCasting ?Core Java
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


 Q73. Where to use interface and abstract class ?Core Java
 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


 Q74. What are the 7 OSI LAYERS ?Networking
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


 Q75. write a program for 4 digit otp generation?Design
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


 Q76. If you are asked to develop a financial system, how would you make sure that there are proper checks , balances and audits ?Solution
 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


 Q77. why is "".equals(str); safer than str.equals("")?Core Java
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


 Q78. How would you test a Twitter application ? Testing
 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


 Q79. Can we keep application configuration at different places and what could be the consideration for choosing multiple places for doing so ?Design
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


 Q80. Do you think it's a good practice to keep passwords in config files ?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     


 Q81. Difference between Query param and path param ?
 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


 Q82. SQL Questions.Database
 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


 Q83. Difference between injection and auto wiring.Spring
 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


 Q84. Explain Rest architectureRest
 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


 Q85. What is SNMP ?Networking
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


 Q86. Create a component and sort the data to show specific information.React JS
 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


 Q87. how would you build application stack using Cloud Formation ?
Amazon Web Services (AWS)
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


previous 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: