Thursday, December 27, 2018

Anycast

AnyCast is a Wi-Fi display receiver, which supports the Miracast standard for Android & Microsoft Windows, and DLNA for the home multimedia application.




Sunday, May 20, 2018

What is Object oriented programming:

Father - Son, go and get Red Label
Son - 750ml or 1 ltr??

Mother - Son, go and get Red Label
Son - 500gms or 1 kg??!!

Wednesday, May 9, 2018

My student achieved a certificate



Its great  news for me, when I knew that Er. Mayank Kumar has worked on java project for ZipUnzip software, and achieved this certificate from Vinoba Behave University, Hazaribag.

He is one of my best student and I wish him a bright future.

Why downcasting in java is dangerous

By casting we don't cast the real object, but just labelled it in different ways. Cat can be upcast to Animal, but the real object always remains cat, however we labelled it as Animal, however if need to get the properties of cat, we have to downcast from Animal to Cat.

But, if we will try to downcast in inappropriate class type which is not actually referred by the reference variable, then it gives an exception.

For example:

If superclass reference holds the object of subclass then it's okay to type cast, but just imagine if it doesn't…

class A{}

class B extends A{}

A a = new B()

B b = (B)a; // no problem

A a1 = new A();

B b1 = (B)a1; // type cast causes error

Tuesday, April 17, 2018

Why the java.lang.System neither abstract nor instantiable

It’s to prevent you from making a subclass that can be instantiated. In Java:

* an abstract class cannot be instantiated, but its subclasses can be

* a final class cannot be subclassed

* a class cannot be both final and abstract

The System class has a private constructor to prevent you from instantiating it (this is good practice for “utility classes”), and it is final to prevent you from getting around that by creating a subclass that has a usable constructor. And because it is final, it cannot be abstract

Regards: https://www.quora.com/Why-isn-t-the-Java-lang-system-class-in-Java-an-abstract-when-it-cannot-be-instantiated/answer/Jon-Harley?share=782923fd&srid=h5t7z

Wednesday, March 28, 2018

What, If i reject you in this interview

This question is asked to check the performance of the candidate under stress.

When the interviewer asks this question, you are already in his top list.

Interviewer- What is the answer of "If I reject you in this interview then what will you do"?

Don’t get tensed. Keep your cool. Think about your interviewer. Be a bit empathetic.

Worst answer

I will learn and make myself better. I won’t get hurt bla bla bla.

(Nobody wants to hire someone who is self centered and thinks about himself only).

Good answers

I’m sorry that I wasted your time, Sir. Have a wonderful day ahead. Hope you find the right candidate.

or

I will eat something good in my lunch and will watch Game of Thrones (with a humour).

or

(If it is a campus interview)

You can say “Okay Sir. No problem. Let me know if I can help you with any other thing. If you want, I can be your guide for a local tour.”

(Companies hire people who can work continuously without losing their cool in stressful conditions.)

Best Answer (If you want to take a risk)

You- Of course, you can reject me.

(Treat the interviewer as your client. First agree with him. Keep your cool.)

Interviewer- Okay. I’m going to reject you.

You- But!!!

Interviewer- But what?

You- Will you find another candidate like me?

(You just questioned his decision. He has to think again.)

Interviewer- I will try to find a better one.

(But, when, how, where? lots of probability.)

You- It may take you some time, Sir. But, what if you won’t find a good candidate like me?

(You just stated him the consequences if he won’t select you today.)

Interviewer- I will call you and hire you. Is that okay?

You- Do you think, I will be available for hiring?

(You just created an urgency. If he won’t hire you today, he will lose you for ever.)

What you think, will you get hired after this?

I’m sure, you will get selected…

Regards : Quora - Barun Mohanty