Abstract Class in Scala

Can we create an instance of abstract class in SCALA? Please help me. Why we use abstract class instead of traits in Scala (except multiple with ). Please help me.

No, you cannot create instances of an abstract class. You need to define a subclass that implements the methods of abstract class and then instantiate that subclass.
For the question when to use traits and when abstract class, following link gives a better picture:

Hi Pratyush,

Thanks for your response. Can we mix in a trait by using with without extend any class. e.g.

package com.myhome.traits
trait Philosophical {
def philosophize(){
println(“I consume memory, therefore I am!!!”)

package com.myhome.classes
import com.myhome.traits.Philosophical

class Frog with Philosophical{
override def toString = “Green !!!”

override def philosophize(){
println(“This is Overriden method…”)

Whats wrong with this code.

What error are you getting?