Add office photos
Engaged Employer

ITC Infotech

3.8
based on 3.8k Reviews
Filter interviews by

Belco Pharma Interview Questions and Answers

Updated 10 Jun 2024
Popular Designations

Q1. Difference between String builder and String buffer

Ans.

String builder is not synchronized, while String buffer is synchronized.

  • String builder is faster than String buffer because it is not synchronized.

  • String buffer is thread-safe, while String builder is not.

  • String builder is preferred for single-threaded applications, while String buffer is preferred for multi-threaded applications.

Add your answer

Q2. Select 3 rd highest salary from employee table

Ans.

To select the 3rd highest salary from the employee table, you can use a SQL query with the 'LIMIT' and 'OFFSET' keywords.

  • Use a SQL query like 'SELECT salary FROM employee ORDER BY salary DESC LIMIT 1 OFFSET 2' to get the 3rd highest salary.

  • The 'ORDER BY' clause sorts the salaries in descending order, 'LIMIT 1' limits the result to 1 row, and 'OFFSET 2' skips the first two rows.

  • Make sure to adjust the 'OFFSET' value if you want to find the nth highest salary.

Add your answer

Q3. difference between == and equals in string

Ans.

The == operator checks for reference equality, while the equals method checks for value equality in strings.

  • Use == to check if two string variables refer to the same object in memory.

  • Use equals() method to check if two string variables have the same sequence of characters.

  • Example: String str1 = "hello"; String str2 = "hello"; str1 == str2 will return false, but str1.equals(str2) will return true.

Add your answer

Q4. Difference between put and patch

Ans.

Put is used to create or replace a resource, while patch is used to update a resource partially.

  • Put is idempotent, meaning multiple identical requests will have the same effect as a single request

  • Patch is not idempotent, as multiple identical requests may have different effects

  • Put requires the client to send the entire updated resource, while patch only requires the specific changes to be sent

Add your answer
Discover Belco Pharma interview dos and don'ts from real experiences

Q5. Difference way of declaring String

Ans.

String can be declared using double quotes, single quotes, or the String constructor.

  • Declare using double quotes: String str1 = "Hello";

  • Declare using single quotes: String str2 = 'World';

  • Declare using String constructor: String str3 = new String("Java");

Add your answer

Q6. Convert array into arraylist

Ans.

Convert array to ArrayList of strings

  • Create a new ArrayList

  • Use Arrays.asList() method to convert array to ArrayList

  • Example: String[] array = {"apple", "banana", "orange"}; ArrayList list = new ArrayList<>(Arrays.asList(array));

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Belco Pharma

based on 1 interviews
Interview experience
5.0
Excellent
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Quality Assurance Interview Questions from Similar Companies

3.5
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter