Life long sharing . . .

Java – Data Types and Variable Types

Posted on: November 21, 2015

This site has a good lesson for Java – Variable Types: http://www.tutorialspoint.com/java/java_variable_types.htm.

variables

datatypes

referencedatatypes

variabledeclaration

Try compiling the below code, what is the error ? Try to fix it to make it work.

lesson3-code1

Now, as a revision for Variable Types,

lesson3-note1

try to spot the different type of variable in the below Java code.

Lesson2-code1

  1. Local variables:
  2. Instance variables:
  3. Class variables:
  4. Which line do you think will throw error when the above code is compiled ?

 

Advertisements

1 Response to "Java – Data Types and Variable Types"

1. int minimumBark;
2. String breed; , String color;
3. static String scienceName = “Canis lupis familiaris”;
4. The 15th line

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

November 2015
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 180 other followers

%d bloggers like this: