Wednesday, 24 December 2008

Education and the Significance of Life by Jiddu Krishna Murthy

Just now i completed reading Education and the Significance of Life By Jiddu KrishnaMurthy.

Nice book written by J.KrishnaMurthy

I want to share few qoutations from this book.

Conventional education makes independent thinking extremely difficult. Conformity leads to mediocrity. To be different from the group or to resist environment is not easy and is often risky as long as we worship success. The urge to be successful, which is the pursuit of reward whether in the material or in the so-called spiritual sphere, the search for inward or outward security, the desire for comfort - this whole process smothers discontent, puts an end to spontaneity and breeds fear; and fear blocks the intelligent understanding of life. With increasing age, dullness of mind and heart sets in.

In seeking comfort, we generally find a quiet corner in life where there is a minimum of conflict, and then we are afraid to step out of that seclusion. This fear of life, this fear of struggle and of new experience, kills in us the spirit of adventure; our whole upbringing and education have made us afraid to be different from our neighbour, afraid to think contrary to the established pattern of society, falsely respectful of authority and tradition.

What is the significance of life? What are we living and struggling for? If we are being educated merely to achieve
distinction, to get a better job, to be more efficient, to have wider domination over others, then our lives will be shallow and empty. If we are being educated only to be scientists, to be scholars wedded to books, or specialists addicted to knowledge, then we shall be contributing to the destruction and misery of the world.

As long as education does not cultivate an integrated outlook on life, it has very little significance.

In our present civilization we have divided life into so many departments that education has very little meaning, except in learning a particular technique or profession. Instead of awakening the integrated intelligence of the individual, education is encouraging him to conform to a pattern and so is hindering his comprehension of himself as a total process.

The individual is made up of different entities, but to emphasize the differences and to encourage the development of a definite type leads to many complexities and contradictions. Education should bring about the integration of these separate entities - for without integration, life becomes a series of conflicts and sorrows. Of what value is it to be trained as lawyers if we perpetuate litigation? Of what value is knowledge if we continue in our confusion? What significance has technical and industrial capacity if we use it to destroy one another? What is the point of our existence if it leads to violence and utter misery? Though we may have money or are capable of earning it, though we have our pleasures and our organized religions, we are in endless conflict.

Education is not merely a matter of training the mind. Training makes for efficiency, but it does not bring about completeness. A mind that has merely been trained is the continuation of the past, and such a mind can never discover the new. That is why, to find out what is right education, we will have to inquire into the whole significance of living.

There is an efficiency inspired by love which goes far beyond and is much greater than the efficiency of ambition; and without love, which brings an integrated understanding of life, efficiency breeds ruthlessness.

To bring about right education, we must obviously understand the meaning of life as a whole, and for that we have to be able to think, not consistently, but directly and truly. A consistent thinker is a thoughtless person, because he conforms to a pattern; he repeats phrases and thinks in a groove. We cannot understand existence abstractly or theoretically. To understand life is to understand ourselves, and that is both the beginning and the end of education. To understand ourselves, we must be aware of our relationship, not only with people, but also with property, with ideas and with nature.

The function of education is to create human beings who are integrated and therefore intelligent. We may take degrees and be mechanically efficient without being intelligent. Intelligence is not mere information; it is not derived from books, nor does it consist of clever self-defensive responses and aggressive assertions. One who has not studied may be more intelligent than the learned. We have made examinations and degrees the criterion of intelligence and have developed cunning minds that avoid vital human issues. Intelligence is the capacity to perceive the essential, the what is; and to awaken this capacity, in oneself and in others, is education. Education should help us to discover lasting values so that we do not merely cling to formulas or repeat slogans; it should help us to break down our national and social barriers, instead of emphasizing them, for they breed antagonism between man and man. Unfortunately, the present system of education is making us subservient, mechanical and deeply thoughtless; though it awakens us intellectually, inwardly it leaves us incomplete, stultified and uncreative.


THE ignorant man is not the unlearned, but he who does not know himself, and the learned man is stupid when he relies on books, on knowledge and on authority to give him understanding.

The right kind of education, while encouraging the learning of a technique, should accomplish something which is of far greater importance: it should help man to experience the integrated process of life. It is this experiencing that will put capacity and technique in their right place. If one really has something to say, the very saying of it creates its own style; but learning a style without inward experiencing can only lead to superficiality.

Education in the true sense is helping the individual to be mature and free, to flower greatly in love and goodness. That is what we should be interested in, and not in shaping the child according to some idealistic pattern.

When we train our children according to a system of thought or a particular discipline, when we teach them to think within departmental divisions, we prevent them from growing into integrated men and women, and therefore they are incapable of thinking intelligently, which is to meet life as a whole.

A parent who really desires to understand his child does not look at him through the screen of an ideal. If he loves the child, he observes him, he studies his tendencies, his moods and peculiarities. It is only when one feels no love for the child that one imposes upon him an ideal, for then one's ambitions are trying to fulfil themselves in him, wanting him to become this or that. If one loves, not the ideal, but the child, then there is a possibility of
helping him to understand himself as he is.

If a child tells lies, for example, of what value is it to put before
him the ideal of truth? One has to find out why he is telling lies. To help the child, one has to take time to study and observe him, which demands patience, love and care; but when one has no love, no understanding, then one forces the child into a pattern of action which we call an ideal.

If we would help the child to be free from the ways of the self, which cause so much suffering, then each one of us should set about altering deeply his attitude and relationship to the child. Parents and educators, by their own thought and conduct, can help the child to be free and to flower in love and goodness.

Intelligence lies in understanding oneself and going above and beyond oneself; but there cannot be intelligence as long as there is fear. Fear perverts intelligence and is one of the causes of self-centred action. Discipline may suppress fear but does not eradicate it, and the superficial knowledge which we receive in modern education only further conceals it.

The right kind of education will encourage thoughtfulness and consideration for others without enticements or threats of any kind. If we no longer seek immediate results, we shall begin to see how important it is that both the educator and the child should be free from the fear of punishment and the hope of reward, and from every other form of compulsion; but compulsion will continue as long, as authority is part of relationship.

To follow authority has many advantages if one thinks in terms of personal motive and gain; but education based on individual advancement and profit can only build a social structure which is competitive, antagonistic and ruthless.

There must be deep insight into the hidden motivations of authority and domination. If we see that intelligence can never be awakened through compulsion, the very awareness of that fact will burn away our fears, and then we shall begin to cultivate a new environment which will be contrary to and far transcend the present social order.

Religious education in the true sense is to encourage the child to understand his own relationship to people, to things and to nature. There is no existence without relationship; and without selfknowledge, all relationship, with the one and with the many, brings conflict and sorrow. Of course, to explain this fully to a child is impossible; but if the educator and the parents deeply grasp the full significance of relationship, then by their attitude, conduct and speech they will surely be able to convey to the child, without too many words and explanations, the meaning of a spiritual life.

In educating a child, deep insight and understanding are necessary.

Only by encouraging the child to question the book, whatever it be, to inquire into the validity of the existing social values, traditions, forms of government, religious beliefs and so on, can the educator and the parents hope to awaken and sustain his critical alertness and keen insight.

The right kind of education means the awakening of intelligence, the fostering of an integrated life, and only such
education can create a new culture and a peaceful world.


Relationship is a mirror in which the self and all its activities can be seen; and it is only when the ways of the self are understood in the reactions of relationship that there is creative release from the self.

Awareness of this whole process, both the conscious and the hidden, is meditation; and through this meditation the self, with its desires and conflicts, is transcended. Self-knowledge is necessary if one is to be free of the influences and values that give shelter to the self; and in this freedom alone is there creation, truth, God, or
what you will.

The desire to imitate is a very strong factor in our life, not only at the superficial levels, but also profoundly. We have hardly any independent thoughts and feelings. When they do occur, they are mere reactions, and are therefore not free from the established pattern; for there is no freedom in reaction.

Fear cannot be eliminated through discipline, sublimation, or through any other act of will: its causes have to be searched out and understood. This needs patience and an awareness in which there is no judgment of any kind.

Only love and right thinking will bring about true revolution, the revolution within ourselves. But how are we to have love? Not through the pursuit of the ideal of love, but only when there is no hatred, when there is no greed, when the sense of self, which is the cause of antagonism, comes to an end. A man who is caught up in the pursuits of exploitation, of greed, of envy, can never love.

Without love and right thinking, oppression and cruelty will ever be on the increase. The problem of man's antagonism to man can be solved, not by pursuing the ideal of peace, but by understanding the causes of war which lie in our attitude towards life, towards our fellow-beings; and this understanding can come about only through the right kind of education. Without a change of heart, without goodwill, without the inward transformation which is born of self-awareness, there can be no peace, no happiness for men.


If we avoid the responsibility of acting individually and wait for some new system to establish peace, we shall merely become the slaves of that system.


Only right education, and not ideologies, leaders and economic revolutions, can provide a lasting solution for our problems and miseries; and to see the truth of this fact is not a matter of intellectual or emotional persuasion, nor of cunning argument.

It is obviously important to have a very limited number of students in a class, so that the educator can give his full attention to each one. When the group is too large he cannot do this, and then punishment and reward become a convenient way of enforcing discipline.

The right kind of education is not possible en masse. To study each child requires patience, alertness and intelligence. To observe the child's tendencies, his aptitudes, his temperament, to understand his difficulties, to take into account his heredity and parental influence and not merely regard him as belonging to a certain category - all this calls for a swift and pliable mind, untrammelled by any system or prejudice. It calls for skill, intense
interest and, above all, a sense of affection; and to produce educators endowed with these qualities is one of our major problems today.

It is particularly important that students and teachers meet regularly to discuss all matters relating to the well-being of the whole group. A student council should be formed, on which the teachers are represented, which can thrash out all the problems of discipline, cleanliness, food and so on, and which can also help to guide any students who may be somewhat self-indulgent, indifferent or obstinate.

The school should encourage the children to understand one another's difficulties and peculiarities, moods and tempers; for then, as they grow up, they will be more thoughtful and patient in their relationship with others.
This same spirit of freedom and intelligence should be evident also in the child's studies. If he is to be creative and not merely an automaton, the student should not be encouraged to accept formulas and conclusions. Even in the study of a science, one should reason with him, helping him to see the problem in its entirety and to use his own judgment.

But what about guidance? Should there be no guidance whatsoever? The answer to this question depends on what is meant by `guidance.' If in their hearts the teachers have put away all fear and all desire for domination, then they can help the student towards creative understanding and freedom; but if there is a conscious or unconscious desire to guide him towards a particular goal, then obviously they are hindering his development. Guidance towards a particular objective, whether created by oneself or imposed by another, impairs creativeness.

The right kind of education should also help the student to discover what he is most interested in. If he does not find his true vocation, all his life will seem wasted; he will feel frustrated doing something which he does not want to do.

Right education should help the student, not only to develop his capacities, but to understand his own highest interest.

The right kind of education does not depend on the regulations of any government or the methods of any particular system; it lies in our own hands, in the hands of the parents and the teachers.

An educator is not merely a giver of information; he is one who points the way to wisdom, to truth.

Intelligence has nothing to do with the passing of examinations. Intelligence is the spontaneous perception which makes a man strong and free. To awaken intelligence in a child, we must begin to understand for ourselves what intelligence is; for how can we ask a child to be intelligent if we ourselves remain unintelligent in so many ways? The problem is not only the student's difficulties, but also our own: the cumulative fears, unhappiness and frustrations of which we are not free. In order to help the child to be intelligent, we have to break down within ourselves those hindrances which make us dull and thoughtless.


A true artist is beyond the vanity of the self and its ambitions. To have the power of brilliant expression, and yet be caught in worldly ways, makes for a life of contradiction and strife. Praise and adulation, when taken to heart, inflate the ego and destroy receptivity, and the worship of success in any field is obviously detrimental to intelligence.

Learning a technique may provide us with a job, but it will not make us creative; whereas, if there is joy, if there is the creative fire, it will find a way to express itself, one need not study a method of expression. When one really wants to write a poem, one writes it, and if one has the technique, so much the better; but why stress what is but a means of communication if one has nothing to say? When there is love in our hearts, we do not search for a way of putting words together.

The freedom to create comes with self-knowledge; but selfknowledge is not a gift. One can be creative without having any particular talent. Creativeness is a state of being in which the conflicts and sorrows of the self are absent, a state in which the mind is not caught up in the demands and pursuits of desire.

Friday, 12 December 2008

Quick Review of Inner Classes in Java

Today I was again going through SCJP Sun Certified Programmer for Java 5 Study Guide by Keithy Sierra and Bert Bates as I needed some clarification.

I would like to thank authors for producing such an excellent book.

I think all chapters are worth to read but I enjoyed reading Threads and Generics and Collections.

For a quick go round, I would like to share some of the important features in Inner Classes in Java, that i came to know from this book.

In Object Oriented programming, for reuse and flexibility/extensibility you need to keep your classes specialized. In other words, a class should have code only for the things an object of that particular type needs to do; any other behavior should be part of another class better suited for that job.

Sometimes, though, you find yourself designing a class where you discover you need behavior that belongs in a separate, specialized class, but also needs to be intimately tied to the class you're designing.

One of the key benefits of an inner class is the "special relationship" an inner class instance shares with an instance of the outer class. That "special relationship" gives code in the inner class access to members of the enclosing (outer) class, as if the inner class were part of the outer class.
In fact, that's exactly what it means: the inner class is a part of the outer class.

Let's look at each of them.

Regular) Inner classes

A normal "regular" inner class is declared inside the curly braces of another class, but outside any method or other code block.

class MyOuter {
class MyInner { }

An inner class is a full-fledged member of the enclosing (outer) class, so it can be marked with an access modifier as well as the abstract or final modifiers. (Never both abstract and final together— remember that abstract must be subclassed, whereas final cannot be subclassed).

An inner class instance shares a special relationship with an instance of the enclosing class. This relationship gives the inner class access to all of the outer class's members, including those marked private.

class MyOuter {
private int x = 7;

// inner class definition
class MyInner {
public void seeOuter() {
// Yes you can access the private variables of enclosing class
System.out.println("Outer x is " + x);
} // close inner class definition

} // close outer class

To instantiate an inner class, you must have a reference to an instance of the outer class to tie to the inner class.
An inner class instance can never stand alone without a direct relationship to an instance of the outer class.

From code within the enclosing class, you can instantiate the inner class using only the name of the inner class, as follows:

MyInner mi = new MyInner();

From code outside the enclosing class's instance methods, you can instantiate the inner class only by using both the inner and outer class names, and a reference to the outer class as follows:

MyOuter mo = new Myouter();
MyOuter.MyInner inner = MyInner();


MyOuter.MyInner inner = new MyOuter().new MyInner();

From code within the inner class, the keyword this holds a reference to the inner class instance. To reference the outer this (in other words, the instance of the outer class that this inner instance is tied to) precede the keyword this with the outer class name as follows: MyOuter.this;

Method-local inner classes

A method-local inner class is defined within a method of the enclosing class.

class MyOuter2 {
private String x = "Outer2";

void doStuff() {
class MyInner {
public void seeOuter() {
System.out.println("Outer x is " + x);
} // close inner class method
} // close inner class definition
} // close outer class method doStuff()

} // close outer class

For the inner class(Method - Local Inner Class) to be used, you must instantiate it, and that instantiation must happen within the same method, but after the class definition code.

class MyOuter2 {
private String x = "Outer2";
void doStuff() {
class MyInner {
public void seeOuter() {
System.out.println("Outer x is " + x);
} // close inner class method
} // close inner class definition

MyInner mi = new MyInner(); // This line must come
// after the class
} // close outer class method doStuff()
} // close outer class

In other words, no other code running in any other method—inside or outside the outer class—can ever instantiate the method-local inner class. Like regular inner class objects, the method-local inner class object shares a special relationship with the enclosing (outer) class object, and can access its private (or any other) members. However, the inner class object cannot use the local variables of the method the inner class is in unless those variables are marked final.

This is bcoz the local variables of the method live on the stack, and exist only for the lifetime of the method. You already know that the scope of a local variable is limited to the method the variable is declared in. When the method ends, the stack frame is blown away and the variable is history. But even after the method completes, the inner class object created within it might still be alive on the heap if, for example, a reference to it was passed into some other code and then stored in an instance variable. Because the local variables aren't guaranteed to be alive as long as the method-local inner class object, the inner class object can't use them. Unless the local variables are marked final!

The only modifiers you can apply to a method-local inner class are abstract and final. (Never both at the same time, though.)

A local class declared in a static method has access to only static members of the enclosing class, since there is no associated instance of the enclosing class. If you're in a static method there is no this, so an inner class in a static method is subject to the same restrictions as the static method. In other words, no access to instance variables.

Anonymous inner classes

Anonymous inner classes have no name, and their type must be either a subclass of the named type or an implementer of the named interface.

Type - 1 (Subclass of the named type)

class Popcorn {
public void pop() {
class Food {
Popcorn p = new Popcorn() {
public void pop() {
System.out.println("anonymous popcorn");

Polymorphism is in play when anonymous inner classes are involved. You can only call methods on an anonymous inner class reference that are defined in the reference variable type! This is no different from any other polymorphic references, for example,

class Horse extends Animal{
void buck() { }
class Animal {
void eat() { }

class Test {
public static void main (String[] args) {
Animal h = new Horse();; // Legal, class Animal has an eat() method
h.buck(); // Not legal! Class Animal doesn't have buck()

Type - 2 (Implementer of the specified interface type)

interface Cookable {
public void cook();
class Food {
Cookable c = new Cookable() {
public void cook() {
System.out.println("anonymous cookable implementer");

Anonymous interface implementers can implement only one interface.

Type - 3 (Argument defined anonymous inner classes)

class MyWonderfulClass {
void go() {
Bar b = new Bar();
b.doStuff(new Foo() {
public void foof() {
} // end foof method
}); // end inner class def, arg, and b.doStuff stmt.
} // end go()
} // end class

interface Foo {
void foof();
class Bar {
void doStuff(Foo f) {}

An argument-local inner class is declared, defined, and automatically instantiated as part of a method invocation. The key to remember is that the class is being defined within a method argument, so the syntax will end the class definition with a curly brace, followed by a closing parenthesis to end the method call, followed by a semicolon to end the statement: });

An anonymous inner class is always created as part of a statement; don't forget to close the statement after the class definition with a curly brace. This is a rare case in Java, a curly brace followed by a semicolon.

Because of polymorphism, the only methods you can call on an anonymous inner class reference are those defined in the reference variable class (or interface), even though the anonymous class is really a subclass or implementer of the reference variable type.

An anonymous inner class can extend one subclass(type-1) or implement one interface(type-2), Unlike non-anonymous classes (inner or otherwise), an anonymous inner class cannot do both. In other words, it cannot both extend a class and implement an interface, nor can it implement more than one interface.

Static nested classes

Static nested classes are inner classes marked with the static modifier.

class BigOuter {
static class Nested { }

A static nested class is not an inner class, it's a top-level nested class.

The class itself isn't really "static"; there's no such thing as a static class. The static modifier in this case says that the nested class is a static member of the outer class. That means it can be accessed, as with other static members, without having an instance of the outer class.

Because the nested class is static, it does not share any special relationship with an instance of the outer class. In fact, you don't need an instance of the outer class to instantiate a static nested class.

Instantiating a static nested class requires using both the outer and nested class names as follows:

BigOuter.Nested n = new BigOuter.Nested();

complete code ....

class BigOuter {
static class Nest {void go() ( System.out.println("hi"); } }
class Broom {
static class B2 {void goB2() { System.out.println("hi 2"); } }
public static void main(String[] args) {
BigOuter.Nest n = new BigOuter.Nest(); // both class names
B2 b2 = new B2(); // access the enclosed class

Which produces:

hi 2

Just as a static method does not have access to the instance variables and non-static methods of the class, a static nested class does not have access to the instance variables and non-static methods of the outer class. Look for static nested classes with code that behaves like a nonstatic (regular inner) class.

Hope will it gives overall view...