This question already has answers here:
Benefit of using Parcelable instead of serializing object
(9 answers)
Closed 9 years ago.
can anyone please explain me what it means by the performance issue the serialization encounters and make the Parcelable an efficient way rather than serialization in android to pass an object from one activity to another.
Thanks In Advance.
You should read a nice blogpost about it : http://www.developerphil.com/parcelable-vs-serializable/
Related
This question already has answers here:
Marker Interfaces in Java?
(10 answers)
Closed 3 years ago.
I just need some clarifications regarding marker interface in java. I have read that its an empty interface in java. I just want to know why and where we need to use this. Can anyone please help.
Shortly said, it is used to mark (or annotate) types with some information that the JVM compiler will use. For instance, the Serializable is a marker interfaces that a type must implement if it needs to have its state persisted (serialized and deserialized).
This question already has answers here:
What is the use of an empty abstract class?
(3 answers)
Closed 5 years ago.
Yesterday, I had an interviewing with a company.
They ask me "Why do we need an empty class in Java?"
I never use an empty class so I have no idea about the purpose of this.
Anyone help?
Thank you so much.
No, we don't need an empty class in Java. We can create one but there is literally no benefit of having that empty class.
This question already has answers here:
Create a mutable java.lang.String
(6 answers)
Closed 5 years ago.
I want to make String class mutable, simplest way to do this is make inner char array is public. How can i achive it?
I'm pretty new to this so sorry if this is wrong.
Wouldn't it be possible to inherit from the String class then override the required method?
Adam
This question already has answers here:
Is there a Java equivalent or methodology for the typedef keyword in C++?
(12 answers)
Closed 9 years ago.
I have some horrible classes' names. And I need to rename them, to make them more human-readable.
In C/C++, it is possible to create typedef, it resolves the problem.
But what about in Java? What are the possible ways to do it?
Thank you a lot!
There aren't any aliasing mechanisms in Java. Probably because aliasing drastically disminishes readability, as you may see a block of code and don't have any idea of what the types really are.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What is the difference between Class.this and this in Java
I know what this means in Java, but sometimes I see something like SomeClass.this, what does it mean? does it refer to a static class filed? Could you please explain with an example?
Thanks.
It is a way code in a method of your inner class can refer to the encompassing outer class instance.