Monday, January 4, 2016

Top 10 Java Questions Asked During Job Interview

 Java has been at the heart of all technologies. The programming language is being used by large community of developers across the world. Many of today’s leading technologies use Java at the core. Most tech organizations demand the throughout knowledge of Java for software engineer candidate. Today we have compiled the list of Java questions asked during job interview.

 What if the main method is declared as private?

Answer: The program compiles properly but at runtime it will give “Main method not public.” message.

2. What is meant by pass by reference and pass by value in Java?

Answer: Pass by reference means, passing the address itself rather than passing the value. Pass by value means passing a copy of the value.

3. If you’re overriding the method equals() of an object, which other method you might also consider?

Answer: hashCode()

4. Why oracle Type 4 driver is named as oracle thin driver?

Answer: Oracle provides a Type 4 JDBC driver, referred to as the Oracle “thin” driver. This driver includes its own implementation of a TCP/IP version of Oracle’s Net8 written entirely in Java, so it is platform independent, can be downloaded to a browser at runtime, and does not require any Oracle software on the client side. This driver requires a TCP/IP listener on the server side, and the client connection string uses the TCP/IP port address, not the TNSNAMES entry for the database name.

5. What is the Java API?

Answer: The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.

6. What is the GregorianCalendar class?

Answer: The GregorianCalendar provides support for traditional Western calendars.

7. What is the ResourceBundle class?

Answer: The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program’s appearance to the particular locale in which it is being run.

8. Why there are no global variables in Java?

Answer: Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:
The global variables breaks the referential transparency
Global variables create collisions in namespace.

9. What is the SimpleTimeZone class?

Answer: The SimpleTimeZone class provides support for a Gregorian calendar.

10. What is explicit casting?

Answer: Explicit casting in the process in which the complier are specifically informed to about transforming the object.

Source : 

16 Java And Programming Quotes To Motivate Yourself

Knowing the great people of your field is a great motivational factor. It can help you push yourself to limits, you can excel your skills in what you are doing. One of the fundamental belief of Agile development methodology is to create highly motivated developers. The only way programmers can keep themselves motivated is by looking at what your colleagues are doing, listening to great renowned developers and reading programming stories. Quotes can push to limits. Today we are sharing some timeless quotes from rest programmers who have done immense contribution to Java and programming community.

“It is not enough for code to work.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

“I’m not a great programmer; I’m just a good programmer with great habits.” - Kent Beck

“Truth can only be found in one place: the code.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

”We want to get engineers to think about something else.” - James Gosling, Creator of Java

“Responsibility cannot be assigned; it can only be accepted. If someone tries to give you responsibility, only you can decide if you are responsible or if you aren’t.” - Kent Beck, Extreme Programming Explained: Embrace Change

“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.” - Brian Goetz, Java Concurrency in Practice

“What would happen if you allowed a bug to slip through a module, and it cost your company $10,000? The nonprofessional would shrug his shoulders, say “stuff happens,” and start writing the next module. The professional would write the company a check for $10,000!” - Robert C. Martin, The Clean Coder

“Slaves are not allowed to say no. Laborers may be hesitant to say no. But professionals are expected to say no. Indeed, good managers crave someone who has the guts to say no. It’s the only way you can really get anything done.” - Robert C. Martin, The Clean Coder: A Code of Conduct for Professional Programmers

“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.” ― Brian Goetz, Java Concurrency in Practice

“One advantage of static factory methods is that, unlike constructors, they have names.” - Joshua Bloch, Effective Java Programming Language Guide

“Redundant comments are just places to collect lies and misinformation.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

“Do The Simplest Thing That Could Possibly Work” - Kent Beck

“Duplication is the primary enemy of a well-designed system.” - Robert C. Martin, The Robert C. Martin Clean Code Collection (Collection)

“Just as it is a good practice to make all fields private unless they need greater visibility, it is a good practice to make all fields final unless they need to be mutable.”- Brian Goetz, Java Concurrency in Practice

“A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

“The ratio of time spent reading (code) versus writing is well over 10 to 1 … (therefore) making it easy to read makes it easier to write.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship 

7 Hidden Features Of Facebook Messenger

Facebook messenger is one of the most popular apps in the world. Facebook separated the messaging tool from core Facebook app long back. Over the time, Facebook has added interesting features to Messenger. The app is being used by over 700 million users in the world. Here are some interesting tips about Messenger that you must know.

1. Make Free Voice And Video Calls

Messenger can do much more than just sending a plain text message. The app supports voice and video calls over the internet. You can video call your friends using Messenger. To call someone who has the messenger app, simply tap the video or phone icon in the top right corner of message window.

2. Send Money

This is a newly added feature in Messenger. The app lets you transfer money from your bank account to your Facebook friends over messenger. You need to setup the payment option. Select ‘Payments’ from messenger settings, enter amount you want to send and add your Visa or Mastercard. Each transaction takes few business days. The best part is, Facebook doesn’t charge any fee for the transaction.

3. Talk To Brands

Facebook has partnered with a customer-service platform, Zendesk to help you communicate with companies. You can talk to retailers right from Messenger. You can purchase something from an online store, if your Facebook account is tied into the order, you will get the order details in Messenger. Currently it works only with Everlane and Zulily. 

4. Share Your Location

You can share your current location with your friends using Messenger. Simply tap three-dots button in bottom right corner and tap ‘Location’. You can either share your current location or a pin somewhere else on the map.

5. Use Other Apps In Messenger

You can use apps like ESPN and Giphy in messenger. You need to integrate them once. You can use Giphy to send quick GIF or share some sports memes and highlights from ESPN. 

6. Use Messenger Web App

Very few people have heard of web app version of Facebook Messenger. Just log on to 

7. You Don’t Need Facebook Account To Use Messenger

Earlier this year, Facebook revoked the requirement of having Facebook account to use Messenger. You can simply sign up with your phone number to use messenger. You can create a Messenger account from the mobile app or website. 

6 Easy Tricks To Speed Up Your iPhone

 We use smartphones for almost everything these days. The technology has revolutionized our lifestyle. iOS is known for the best RAM and memory management but yet, your iPhone can get slow over time. Today we have listed few tips and tricks that can help you optimize your iPhone.

1. Get Rid of Old Photos

Deleting unnecessary old photos is good way to speed up your iPhone. Photos put lot of toll on RAM memory. If you have got plenty of photos, you can try syncing them up with iCloud and erasing from device memory. 

2. Delete Apps

If your iPhone is bloated with number of unnecessary and memory-heavy apps, it can slow down your phone. To see how much space an app is occupying, head over to Settings > General > Storage & iCloud Usage > Manage Storage. 

3. Erase Old Text Messages

If you have never deleted any messages from your iPhone, it’s high time that you do it. It can weigh down phone’s software to great extent. You can automate this process by setting default amount of time you to keep messages. iOS offers 30 days, 1 year and forever. You can find these options under Settings > Messages > Keep Messages.

4. Empty Safari’s Cache

Emptying browsing cache and cookies can speed up your device. Clearing history and website data is must. Head over to Settings> > Safari > Clear History and Website Data. 

5. Turn Off Auto App Updates

You can speed up your iPhone by turning off auto updates. iPhone tends to run little slow while it’s downloading updates in the background. You can change this in settings, head over to Settings > iTunes & App Store then, toggle to ‘Updates’ slider to off mode.

6. Restart Your iPhone

Smartphones are used for lot of computing activities. You must treat your iPhone like a miniature computer. It’s healthy to restart your iPhone once in a while. Turning off your phone can help your iPhone to let go of some resources it is holding for long time. 

5 Things To Do With Your Old Android Device

Did you recently upgrade your Android device? Statistics say that, average smartphone user upgrades smartphone once in every two years. Every time you upgrade your smartphone, you have the big question of what to do with your old device. There are number of creative ways you can utilize your old smartphone in improving your day-to-day life. Today we have listed 10 things to do with your old Android smartphone.

1. Retro Gaming Console

It’s a very easy thing to pair your old Android device with television via Chromecast of HDMI cable. You can download selection of emulators for your classic gaming consoles. There are apps from Super Nintendo to Sega Genesis on Android. You can pair up some bluetooth gaming console with Android device and you are good to go. Playstation remote controller works just fine with Android devices.

2. Gym Device

Your old Android device can be an ideal gym tool. You can format the smartphone, remove unnecessary apps and data. This will avoid unnecessary distractions in gym. You can use this device as a MP3 player while working out. You can even pair it up with a cheap fitness tracer or smartwatch for extra functionality.

3. Desktop Computer

Yes, you can install your old Android device as a desktop computer. Even the oldest smartphone is more powerful than what desktop computers were. You can install Debian or any version of Linux operating system on your device, connect it to monitor. You can sync up with bluetooth keyboard, mouse and you are good to go.

4. Car GPS

There is no doubt that you can use old Android device as a GPS navigation unit with your car. There are number of great navigation apps available for Android (Google Maps, CityMapper, Waze etc.) You can use the old Android device as a dedicated GPS unit in your car. You can even plug it using aux cable and double up the usage as a dedicated stereo/MP3 player.

5. WiFi Extender

If you have weak WiFi signals in your house or office, you can extend the signal range using your old Android device. You need to use some app like fqrouter2. The app will pick up signal and repeat it. However, the app requires rooted Android device.