Skip to main content

Java interview questions (Nepal)

At 2014, I completed my Bachelors in Computer Engineering. I had applied to number of software development companies in Nepal. Some of them are:

1. Deerwalk Inc.
2. Himalayan IT
3. F1 soft
4. Leapfrog Technologies
5. E & T Nepal

There were different types of exams and tests. Interviews, written test, simple programming tasks, IQ tests, etc were pretty common in all the companies. As I had applied for Java developer's post, I faced various questions which I have compiled here for your references. It is really helpful to be able to answer these questions and go for any interview calls.

Please let me know if there is any concern.

1. Difference between Class and Object
2. Difference between Abstract class and interfaces
3. What is singleton class?
4. What is reflection in java?
5. Difference between OOP in java and OOP in C ++
6. Do you define a function in interfaces?
7. Can you name 15 keywords of java?
8. What is top-down approach? What is bottom-up approach?
9. What is "static" in java? (answer based on static variable, static method, static class, static code block)
10. What is the use of super in Java?
11. How can you use "final" in java? (answer based on final variable, final method, final class)
12. Different types of access specifiers. (public, protected, private, default)
13. What happens if you make constructor private?
14. Can you name any design patterns?
15. What is thread?
16. How can you make threads in Java?
17. What is the use of synchronized keyword?

Comments

Popular posts from this blog

Run different version of chrome using python selenium

Hello, If you are looking for Firefox , please see this link For some purpose I had to run different versions of google chrome using selenium python. I used different versions of chromes from here . A discussion on stackoverflow can be found here I extracted the compressed file and moved the chrome.exe file inside the directory with version name. Please see the screenshot below. Notice the chrome executable in this directory. I downloaded few more versions and did same with them. Then I places those inside the following directory: C:\Program Files (x86)\Google\Chrome Then I had to use binary_location as below. I had four different versions as shown in the image above. Out of them, one was randomly picked using random.choice()  method and the binary_location was created on runtime. from selenium import webdriver import random chrome_options = webdriver.ChromeOptions() available_versions = ['56.0.2924.87', '57.0.2987.133'

Trekking to Chandragiri Hills (Nepal)

Fitbit trekking records: Over 13000 steps 300 + storeys climbed 2.75 hours Altitude 2500 m (Approx) Cost Rates:  Lunch per plate: Rs. 550/- (Veg and Non-Veg rates are same) Cable car: One way: Rs. 415/- Student One way: Rs. 315/- Both way: Not sure (Guess Rs. 750/-)                     **(Rates may have changed now.) Hiking to Chandragiri Hills 8 th Jan 2017 (Sunday) We had achieved a milestone in one of our projects at Logpoint Nepal Pvt. Ltd, and hence our management committee offered us hiking as celebration. Me including my team members met at the Cable Car Station around 9: 00 in the morning. It took us 15 minutes to reach the Cable Car Station from Kalanki chowk. Main Gate of Cable Car Station Our office had managed us a bottle of water, a can of redbull, a packet of आलु chips and a snicker. We collected our share and started the trek. We were told that it would take us 2 hours to reach the Chandragiri Hills from there.

Run different version of firefox using python selenium

Hello, If you are looking for Google Chrome , please see this link. For some purpose I had to run different versions of Mozilla Firefox using selenium python. I used different versions of firefoxes from  here . After downloading proper version/os version, I had to simply install the browser using custom mode. Then choose a custom place to install. Like C:\Program Files\FirefoxVersion54 Important: Do not launch the firefox. Go to the installation directory and delete three update files from there namely: 1. updater.exe 2. updater.ini 3. update-settings.ini Then launch the firefox and check the version. Now from the python code do the following: from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium import webdriver import random # Assumed that you have installed 52 and 53 as well in the proper path. version_to_use = random.choice(['54', '52', '53'])  path = r'C:\\Program Files\\FirefoxVersion%s\\fire