0% found this document useful (0 votes)
4 views1 page

Java Variable Types and String Basics

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Java Variable Types and String Basics

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

29-Feb-2014.

Java Training.

Declaring the variable:

Static : variable is defined as static it will store in static context, that is at class level.

Non Static: variable is not defined as static by default it is non static variable, this is store at
object level.

String: which store in string pool. Called as char array.

Which is immutable.  which cannot be changed.

String str = “java”; -> object is created in string pool.

String str1 = “java”; -> object is not created instead str1 is referring to str object itself.

String str = “javac”;

String str2 = new String(“hello”); ->

You might also like