Sourav's Coaching

Sourav's Coaching

Share

Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Sourav's Coaching, 57, A Nepal Bhattacharya First Lane, KOLKATA.

25/12/2017

wishes "Merry Christmas" to all the persons who are associated with us. From this holy day we are starting our official hash tag. Please like, share and spread the word. Proper Education can change your life. FYI, We don't take any money from the poor and needy students. Do join us if you want a better career ahead.

22/12/2017

THE KEY TO BECOME SUCCESSFUL IN THIS IT INDUSTRY.

Have you ever know the story of a turtle and a rabbit race when you were a child? Maybe most of you

Let’s me tell you again to revise some childhood memory

“Once upon a time a Turtle and a Rabbit had an argument about who was faster.

They decided to settle the argument with a race. They agreed on a route and started off the race. The rabbit shot ahead and ran briskly for some time. Then seeing that he was far ahead of the turtle, he thought he'd sit under a tree for some time and relax before continuing the race. He sat under the tree and soon fell asleep. The turtle plodding on overtook him and
soon finished the race, emerging as the undisputed champ. The rabbit woke up and realized that he'd lost the race.”

The moral of the story is that slow and steady wins the race. This is the version of the story that we've all grown up with.

But then recently, the story still continues:

1st modern story:

The rabbit was disappointed at losing the race and he did some soul-searching. He realized that he'd lost the race only because he had been overconfident, careless and lax. If he had not taken things for granted, there's no way the turtle could have beaten him. So he challenged the turtle to another race. The turtle agreed. This time, the rabbit went all out and ran without stopping from start to finish. He won by several miles.

The moral of the story?
Fast and consistent will always beat the slow and steady. It's good to be slow and steady; but it's better to be fast and reliable.

But the story doesn't end here.

2nd modern story:

The turtle did some thinking this time, and realized that there's no way he can beat the rabbit in a race the way it was currently formatted. He thought for a while, and then challenged the rabbit to another race, but on a slightly different route. The rabbit agreed.

They started off. In keeping with his self-made commitment to be consistently fast, the rabbit took off and ran at top speed until he came to a broad river. The finishing line was a couple of
kilometers on the other side of the river. The rabbit sat there wondering what to do. In the meantime the turtle trundled along, got into the river, swam to the opposite bank, continued walking and finished the race.

The moral of the story?
First identify your core competency and then change the playing field to suit your core competency.

However, the story still hasn't ended.

3rd modern story:

The rabbit and the turtle, by this time, had become pretty good friends and they did some thinking together. Both realized that the last race could have been run much better.

So they decided to do the last race again, but to run as a team this time. They started off, and this time the rabbit carried the turtle till the riverbank. There, the turtle took over and swam
across with the rabbit on his back. On the opposite bank, the rabbit again carried the turtle and they reached the finishing line together. They both felt a greater sense of satisfaction than they'd felt earlier.

The moral of the story?
It's good to be individually brilliant and to have strong core competencies; but unless you're able to work in a team and harness each other's core competencies, you'll always perform below par because there will always be situations at which you'll do poorly and someone else does well. Teamwork is mainly about situational leadership, letting the person with the relevant core competency for a situation take leadership.

To sum up, the story of the rabbit and turtle teaches us many things.

(1) Fast and consistent will always beat slow and steady;

(2) Work to your competencies

(3) Pooling resources and working as a team will always beat individual performers;

(4) Never give up when faced with failure

(5) Compete against the situation - not against a rival.

At our Organization, we have been told a lot about the moral of this story and always improve ourselves and cooperate well with others to better serve the requirement of clients.

19/12/2017

Why character array in Java is preferred over string while storing the password ?

Here are few reasons which makes sense to believe that character array is better choice for storing password in Java than String:

1) Since Strings are immutable in Java if you store password as plain text it will be available in memory until Garbage collector clears it and since String are used in String pool for reusability there is pretty high chance that it will be remain in memory for long duration, which pose a security threat. Since any one who has access to memory dump can find the password in clear text and that's another reason you should always used an encrypted password than plain text. Since Strings are immutable there is no way contents of Strings can be changed because any change will produce new String, while if you char[] you can still set all his element as blank or zero. So Storing password in character array clearly mitigates security risk of stealing password.

2) Java itself recommends using getPassword() method of JPasswordField which returns a char[] and deprecated getText() method which returns password in clear text stating security reason. Its good to follow advice from Java team and adhering to standard rather than going against it.

3) With String there is always a risk of printing plain text in log file or console but if use Array you won't print contents of array instead its memory location get printed. though not a real reason but still make sense.

String strPassword="Unknown";
char[] charPassword= new char[]{'U','n','k','w','o','n'};
System.out.println("String password: " + strPassword);
System.out.println("Character password: " + charPassword);

String password: Unknown
Character password: [C@110b053

That's all on why character array is better choice than String for storing passwords in Java. Though using char[] is not just enough you need to erase content to be more secure. I also suggest working with hash'd or encrypted password instead of plain text and clearing it from memory as soon as authentication is completed.

14/12/2017

We have a referral walk in this Saturday(16th at Cognizant Techno Complex). Those who are confident in Java/J2EE please do send me the resumes. Mail : [email protected] Cognizant
JD: Experience: 4 Years to 9 Years

Work Location: Kolkata

Interview Location: Kolkata

Interview Date: 16/December/ 2017 (Saturday)

Skill Set: Java, spring, Hibernate (OR) Java, spring, Web services

Notice Period: 90 days

Lets make a bright future in

09/12/2017

There are mainly 3 concepts which can break singleton property of a class. Let’s discuss them one by one.

Reflection: Reflection can be caused to destroy singleton property of singleton class, as shown in following example:
// Java code to explain effect of Reflection
// on Singleton property

import java.lang.reflect.Constructor;

// Singleton class
class Singleton
{
// public instance initialized when loading the class
public static Singleton instance = new Singleton();

private Singleton()
{
// private constructor
}
}

public class GFG
{

public static void main(String[] args)
{
Singleton instance1 = Singleton.instance;
Singleton instance2 = null;
try
{
Constructor[] constructors =
Singleton.class.getDeclaredConstructors();
for (Constructor constructor : constructors)
{
// Below code will destroy the singleton pattern
constructor.setAccessible(true);
instance2 = (Singleton) constructor.newInstance();
break;
}
}

catch (Exception e)
{
e.printStackTrace();
}

System.out.println("instance1.hashCode():- "
+ instance1.hashCode());
System.out.println("instance2.hashCode():- "
+ instance2.hashCode());
}
}

Serialization:- Serialization can also cause breakage of singleton property of singleton classes. Serialization is used to convert an object of byte stream and save in a file or send over a network. Suppose you serialize an object of a singleton class. Then if you de-serialize that object it will create a new instance and hence break the singleton pattern.

// Java code to explain effect of
// Serilization on singleton classes
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.Serializable;

class Singleton implements Serializable
{
// public instance initialized when loading the class
public static Singleton instance = new Singleton();

private Singleton()
{
// private constructor
}
}


public class GFG
{

public static void main(String[] args)
{
try
{
Singleton instance1 = Singleton.instance;
ObjectOutput out
= new ObjectOutputStream(new FileOutputStream("file.text"));
out.writeObject(instance1);
out.close();

// deserailize from file to object
ObjectInput in
= new ObjectInputStream(new FileInputStream("file.text"));

Singleton instance2 = (Singleton) in.readObject();
in.close();

System.out.println("instance1 hashCode:- "
+ instance1.hashCode());
System.out.println("instance2 hashCode:- "
+ instance2.hashCode());
}

catch (Exception e)
{
e.printStackTrace();
}
}
}

Cloning: Cloning is a concept to create duplicate objects. Using clone we can create copy of object. Suppose, we ceate clone of a singleton object, then it wil create a copy that is there are two instances of a singleton class, hence the class is no more singleton.
// JAVA code to explain cloning
// issue with singleton
class SuperClass implements Cloneable
{
int i = 10;


protected Object clone() throws CloneNotSupportedException
{
return super.clone();
}
}

// Singleton class
class Singleton extends SuperClass
{
// public instance initialized when loading the class
public static Singleton instance = new Singleton();

private Singleton()
{
// private constructor
}
}

public class GFG
{
public static void main(String[] args) throws CloneNotSupportedException
{
Singleton instance1 = Singleton.instance;
Singleton instance2 = (Singleton) instance1.clone();
System.out.println("instance1 hashCode:- "
+ instance1.hashCode());
System.out.println("instance2 hashCode:- "
+ instance2.hashCode());
}
}

Photos from Sourav's Coaching's post 07/11/2017

The junior most student of . Master "RajRishi Singha Roy". He is just in class 2, studying in the prestigious "South Point High School" (www.southpoint.edu.in) and our owner (Mr. Sourav Chakravarti) personally started teaching him.

30/08/2017

A QUICK NOTE FOR THE BEGINNERS IN JAVA DEVELOPMENT. ALWAYS TRY TO USE EQUALS METHOD FOR STRING COMPARISON. ->
Both equals() and "==" operator in Java is used to compare objects to check equality but the main difference between equals method and the == operator is that former is a method and later is an operator. Since Java doesn’t support operator overloading, == behaves identical for every object but equals() is method, which can be overridden in Java and logic to compare objects can be changed based upon business rules. Another notable difference between == and equals method is that former is used to compare both primitive and objects while later is only used for objects comparison. At the same time, beginners struggle to find when to use equality operator (==) and when to use equals method for comparing Java objects.

04/12/2016

We have included one new faculty to teach drawing and graphical arts. So kids and their parents, do contact us to become a good painter..

Want your business to be the top-listed Gym/sports Facility in KOLKATA?

Click here to claim your Sponsored Listing.

Location

Culinary Team

Attire

Telephone

Website

Address


57, A Nepal Bhattacharya First Lane
Kolkata
700026