Top "Class" questions

A template for creating new objects that describes the common state(s) and behavior(s). NOT TO BE CONFUSED WITH CSS CLASSES.

Creating an instance of class

What's the difference between lines 1 , 2 , 3 , 4? When do I use each? Why line 3 prints the constructor Foo and line 7 returns an …

c++ class constructor
Increment a Integer's int value?

How do I increment a Integer's value in Java? I know I can get the value with intValue, and I …

java class integer int
What does the variable $this mean in PHP?

I see the variable $this in PHP all the time and I have no idea what it's used for. I've …

php class oop this
Could not find or load main class with a Jar File

I'm trying to load a jar using @echo off java -jar Test.jar pause With the manifest of Manifest-Version: 1.0 Main-Class: …

java class jar main
How to initialize static variables

I have this code: private static $dates = array( 'start' => mktime( 0, 0, 0, 7, 30, 2009), // Start date 'end' => mktime( 0, 0, 0, 8, 2, 2009), // End date 'close' => …

php class static-members
Accessing a class' member variables in Python?

class Example(object): def the_example(self): itsProblem = "problem" theExample = Example() print(theExample.itsProblem) How do I access a class's …

python class methods return
How do I use method overloading in Python?

I am trying to implement method overloading in Python: class A: def stackoverflow(self): print 'first method' def stackoverflow(self, …

python class overloading
Difference between object and class in Scala

I'm just going over some Scala tutorials on the Internet and have noticed in some examples an object is declared …

scala class object
Add and remove a class on click using jQuery?

Please see this fiddle. I am trying to add and remove a class on li elements that are clicked. It …

jquery html css class click
When is it appropriate to use C# partial classes?

I was wondering if someone could give me an overview of why I would use them and what advantage I …

c# class architecture