Can we serialize static variables ?
Questions
Search
List By Company
List By Topic
Legacy
Tests
Repository
DashBoard
Java
Java 8
Java 7
Java Abbreviations
OCJP / SCJP
Class List
New in Java 8
Java Exceptions
Spring Exceptions
Java Enums
Java 8 Lambda
Java 8 java.time
Big Data
Best Of Java
Discussion
Search
Subscribe
Search Interview Questions
More than 3000 questions in repository.
There are more than 900 unanswered questions.
Click here
and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company
Label / Company / Text
Search
Submit Question
Interview Questions and Answers
Q1.
Can we serialize static variables ?
Core Java
Ans. No. Only Object and its members are serialized. Static variables are shared variables and doesn't correspond to a specific object.
Help us improve. Please let us know the company, where you were asked this question
:
Like
Discuss
Correct / Improve
 serialization   java   oops   static   static variables
Asked in 1 Companies
intermediate
 
rare
Correction
Duplicate of Another Question
Company where this question was Asked
Suggestion
Try 2 Question(s) Test
Which of the following is true ?
We can serialize static variables
We can serialize transient variables
We can serialize final variables
We can serialize instance methods
Which of following are serialized ?
static variables
transient variables
instance variables
method local variables
Related Questions
What do you mean by "Java is a statically typed language" ?
How can we run a java program without making any object?
Which of the following combination of keywords is illegal in Java ?
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final
What are the advantages and disadvantages of static variables and static methods ?
What are concepts introduced with Java 5 ?
Why do we write public static void main ? Can we use some other syntax too for main ?
Difference between Static and Singleton Class ?
Can we declare static variables as transient ?
Which of the following can be marked static ?
a. Methods , Variables and Initialization Blocks.
b. Methods , Variables , Initialization Blocks and Outer Classes and nested Classes.
c. Methods , Variables , Initialization Blocks and Outer Classes.
d. Methods , Variables , Initialization Blocks and nested Classes
Which of the following is false about main method ?
a. It should be declared public and static
b. it should have only 1 argument of type String array
c. We can override main method
d. We can overload main method
Help us and Others Improve. Please let us know the questions asked in any of your previous interview.
Any input from you will be highly appreciated and It will unlock the application for 10 more requests.
Company Name:
Questions Asked: