Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Confusing about some vocab

+5 votes

I see these vocabularies in a previous comment, but I still cannot figure out the answer myself. So 

What is the difference between Primitive Types vs Object Types, and Static - Instance methods?

asked Jan 28, 2015 in (Winter 14) by Lan Dang (100 points)

2 Answers

+1 vote
While Greg's answer is *not incorrect*, it refers to material beyond what we've discussed in class / textbook.

Like Greg said, primitive types include int, double, char, boolean...

Examples of objects that we've worked with include: String, Scanner, DrawingPanel, Graphics.  

Static methods are methods like Math.pow(...), or the "public static ..." methods that you write yourself.  These methods can be called without having a specific object to call them with.
Instance methods are methods like name.toUpperCase(), which are operating on a specific String object, g.setColor(...) which is operating on a specific Graphics object.
answered Jan 28, 2015 by Forrest Stonedahl (100 points)
–1 vote

Primitive Types hold values (int, double, char, etc.)

Objects reference others
GiftCard alice = new GiftCard("Macy's", 100.0);
GiftCard bob = alice;

Static methods are called without a receiver and will say static "public static void" 

Instance will not use the word static. and may say public void power (int p) {

here are some helpful links


answered Jan 28, 2015 by Greg Larson (100 points)