Thursday, February 28, 2013

Java and .NET Referal Openings At Infosys

Hi All,

There is scheduled Recruitment drive for Referals who are short-listed on March 16th in across all locations in Infosys.
Please send u r resumes to this id:  sambamca06@gmail.com
Exp Range: 2 to 8 yrs

Note: Please send only genuine profiles.

Wednesday, February 27, 2013

Difference between Abstract class and Interface

Abstract Class
==========
1.An abstract class can have method body (non-abstract methods).
2.An abstract class can have instance variables.
3.An abstract class can have constructor.
4.An abstract class can have static methods.
5.You can extends one abstract class.

ex:
publlic abstract class TxnCommand
{

public abstract void  show();

public void calculate()
{
//Method Implimentatiion;
}

}

Interface
=======
1.Interface have only abstract methods.
2.An interface cannot have instance variables.
3.Interface cannot have constructor.
4.Interface cannot have static methods.
5.You can implement multiple interfaces.

ex:


public
interface CommonCommand
{

public static final int i = 10;
public abstract void  show();

}

difference between static method and instance method in Java

Static Method:
===========
1.A method i.e. declared as static is known as static method.
2.Object is not required to call static method.
3.Non-static (instance) members cannot be accessed in static context (static method, static block and static nested class) directly.
4.For example: public static void show(){..... }.


Instance Method:
============
1.A method i.e. not declared as static is known as instance method.
2.Object is required to call instance methods.
3.static and non-static variables both can be accessed in instance methods.
4.For example: public void show(){...}.


 

Tuesday, February 19, 2013

System.out.println() In Java?

 In Java, the dot operator can only be used to call methods and variables so we know that ‘out’ must be either a method or a variable. Now, how do we categorize ‘out’? Well, ‘out’ could not possibly be a method because of the fact that there are no parentheses – the ‘( )’ – after ‘out’, which means that out is clearly not a method that is being invoked. And, ‘out’ does not accept any arguments because only methods accept arguments – you will never see something like “System.out(5,6).println”. This means ‘out’ must be a variable.

We now know that ‘out’ is a variable, so we must now ask ourselves what kind of variable is it? There are two possibilities – it could be a static or an instance variable. Because ‘out’ is being called with the ‘System’ class name itself, and not an instance of a class (an object), then we know that ‘out’ must be a static variable, since only static variables can be called with just the class name itself. So now we know that ‘out’ is a static member variable belonging to the System class.

The fact that ‘println()’ is clearly a method, we can further classify ‘out’. We have already reasoned that ‘out’ is a static variable belonging to the class System. But now we can see that ‘out’ must be an instance of a class, because it is invoking the method ‘println()’.

When the JVM is initialized, the method initializeSystemClass() is called that does exactly what it’s name says – it initializes the System class and sets the out variable. The initializeSystemClass() method actually calls another method to set the out variable – this method is called setOut().

The more exact answer to the original question is this: inside the System class is the declaration of ‘out’ that looks like: ‘public static final PrintStream out’, and inside the Prinstream class is a declaration of ‘println()’ that has a method signature that looks like: ‘public void println()’.

Here is what the different pieces of System.out.println() actually look like:
//the System class belongs to java.lang package
class System {
  public static final PrintStream out;
  //...
}

//the Prinstream class belongs to java.io package
class PrintStream{
public void println();
//...
}

Tuesday, February 12, 2013

Valentine day special greetins























Scope of Static variables


Static variables cannot be elected for garbage collection while the class is loaded. They can be collected when the respective class loader (that was responsible for loading this class) is itself collected for garbage.


Monday, February 11, 2013

AP EAMCET 2013 Notification

AP EAMCET 2013 Notification Schedule www.apeamcet.org Online Apply AP EAMCET Application form
AP EAMCET
AP EAMCET

AP EAMCET 2013 Notification Schedule - AP EAMCET ( Engineering Agriculture and Medical Common Entrance Test ) Notification 2013 official released by Andhra Pradesh State Government This AP EAMCET conducted by JNTU (Jawaharlal Nehru Technology University ) Hyderabad. The large number of candidates are waiting for this AP EAMCET 2013 Notification. The very good news to this Notification applied Candidates. The EAMCET interested candidates are must qualified in Intermediate. The Intermediate Successfully completed Candidates are eligible for this year EAMCET. This Notification 2013-14 year official published at www.apeamcet.org. 

The Course are offered like B.E., B.Tech, B.Pharmacy, B.Sc Agriculture, B.Sc Horticulture in Engineering and Agriculture courses AND MBBS, BDS, D Phramcy etc. coursed in Medical course. 

This Courses interested candidates are fallow the AP EAMCET official website www.apeamcet.org to download the 2013 year AP EAMCET Online Apply Application form. The Application form submitted along with also paid fee Rupees 250/- paid at nearest E Seva OR AP online Centres. The Completer AP EAMCET Schedule 2013 details are given below. The Interested candidates are fallow the AP EAMCET 2013 Notification Schedule details.


AP EAMCET 2013 Notification Schedule
1For Engineering Entrance Test10-05-2013
10:00 AM to 01:00 PM
2For Agriculture & Medical Entrance Test 10-05-2013
10:00 AM to 01:00 PM
3AP EAMCET Online Application started15-02-2013
3Online Apply Application form Last date 
Without Late Fee
27-03-2013
4Late Fee with 500/-08-04-2013
5EAMCET Application Late Fee 1000/-17-04-2013
6Online Application Late Fee 5000/-27-04-2013
7Last Final Late Fee with 1000/-07-05-2013
8Official Websitewww.apeamcet.org

NOTE :- The AP EAMCET Online Apply Application form started on 15-02-2013.

This Notification is applied candidates are must have age is 17 years to 22 years, SC/ST Candidates upper age 25 years as on 31st December 2012. The AP EAMCET Official notification 2013 link is given below. The Applied candidates are must see the Instructions after then applied this Notification.


Official Website :- www.apeamcet.org

A JiBXException occurred while Unmarshal of request string

This is generally related to :

1. Might may be because of Jars mismatch i.e. There is a mismatch in the jar compilation versions

2. Jars are not builde properly i.e. some classes are missing while builidin Jars.

Valentines Gifts For Him 2013

While gifts for women are often more the focus on Valentine’s Day, men should not be forgotten. More than ever before, Valentines gifts for him are important in modern relationships. As a result, many women scramble to get the perfect gift to express their feelings toward their partners. Unfortunately for most, budget can interfere with what one really wants to get a loved one, but there are ways around that. Below, discover clever and memorable gift ideas to give on the day that Cupid shoots his bow. The most important thing to do is really pay attention to the desires, hobbies, and interests of your Valentine.
Personalized Gifts

Personalized gifts are fantastic for Valentine’s Day because they are a way to really be romantic. Personalization will also make just about any gift unique and special. Virtually anything can be personalized, with his name or yours, with a special photo of the two of you, or anything else you can think of. Personalized love books are great, as are frames, home goods, and countless other items. The possibilities are really limitless.
For The Wine Connoisseur
If you are fortunate enough that your significant other likes wine, finding him a great gift may not be too difficult. There is a massive market of goods that a wine lover would appreciate. You could give him a subscription to a great wine club, or buy him an incredible bottle from his favorite winemaker. Other possible gifts in this category include wine opening and storing accessories, aerators, or even a beautiful set of wine glasses and a decanter, of which most wine lovers can’t seem to have enough.
For The Outdoorsman
Many men enjoy activities in the great outdoors, including hiking, backpacking, and camping. Thankfully, there are all kinds of items to make these nature lovers that much more comfortable. Hiking gear is growing more popular every year, so you can go crazy finding cool devices in this category, even for the experienced hiker who seems to have everything.
For The Golfer
Gift giving for the golfer is easy regardless of budget. Your gift to him can be as small and affordable as monogrammed balls, tees, gloves, a putter, or as significant as a new set of golf clubs. Golf gifts are perfect for personalizing as well, as any golfer can use a personalized golf towel, club links, etc. Whatever you choose, he will think of you whenever he is on the course.
For The Sports Enthusiast
For a sports lover, take notice of the sports he likes to participate in and go from there. For a jogger, consider specific clothing designed just for that activity. For the boyfriend or spouse who prefers to sit on the sidelines and enjoy the games rather that participating in them, there are lots of opportunities to satisfy him as well. For instance, he may like to watch the football game while enjoying a beer or two. Consider giving him a gift to a beer of the month club that will allow him to taste different creations from micro-brewers, delivered to his door every month.
For The Gadget Lover
There is no doubt that many men absolutely love gadgets. You could get him a cool new toy or something more functional that he could use at work. Or, you could also take the accessories route. Whichever way you choose, gadgets are almost always a great gift idea for guys.
For The Fashion Conscious Man
With more and more men paying attention to their personal style and appearance, suave fashion accessories come to the rescue. Choose from scarves, gloves, hats, belts, or ties to complement his every look. Not only are they useful, but they are also a constant reminder of that someone special (you) who gave it to them.
Travel & Organizational Accessories
Men of all ages need them and use them, so they make for very wise gifts. This category could include bags, suitcases, wallets, passport holders, and dopp kits. These help guys stay organized and avoid them from losing important and expensive items. A briefcase or computer bag is another great idea, depending on his needs.
Jewelry
Jewelry is not necessarily just for women. Whether it is a ring or a fabulous necklace, there are many options for Valentines jewelry gifts for men. Choose from precious or semi-precious stones, gold, silver, platinum, and more. Watches and other timepieces would also fall under this category, all of which make incredible gifts.
His Favorite TV Series On DVD Or To Download
This is the perfect gift for the guy that loves a particular television show. It will last forever and he can enjoy it at any time. It is a great way to begin a collection, where you buy one season at a time, or all the available seasons at once if you can afford it.
Instead Of Gift Cards Or Cash…
As a change of pace from gift cards or cash, this is the perfect time to buy him gold for Valentine’s Day instead. With the current economic and political climate, inflation is likely on the horizon. If he is a financial or business type guy, he will appreciate your astuteness in economic matters. Valentine’s Day 2013 really is a great time to be buying gold. Plus, many guys love the idea of owning rare gold coins or bullion.
Lingerie
If you racked your brain and you are still struggling with what to get him, you can never go wrong with lingerie. Everyone wins when you buy Valentines Day lingerie. He gets to see his favorite girl looking sexy, and you get to keep the lingerie!
Regardless of the direction you decide to take, buying Valentines gifts for him doesn’t have to be a daunting task. Actually, it can be a lot of fun. The only thing to remember is to consider his personality and likes. If you keep those two things in mind, it can become easy. The more observant you are, the happier he’ll be, especially when he might be expecting the same old thing and you rock his world with the perfect gift that shows you know what he likes and you cared enough to notice.

Sunday, February 10, 2013

Difference between ClassNotFound exception and NoClassDefinition

ClassNotFoundException comes when JVM tries to load a class at runtime dynamically means you give the name of class at runtime and then JVM tries to load it and if that class is not found in classpath it throws ClassNotFoundException.  ClassNotFoundException comes on Runtime when requested class is not available in classpath and mainly due to call to Class.forName () or Classloader.loadClass () or ClassLoader.findSystemClass ().

While in case of NoClassDefFoundError the problematic class was present during Compile time and that's why program was successfully compile but not available during runtime by any reason.



Thread life cycle


Saturday, February 9, 2013

why String is immutable

Immutable means that the current object is unchangeable & operations on it will return another new object which you have to catch to see the changes.  String class is such class where methods like toUpperCase() etc will return String object which you have to save in a new variable....
however if their is a long string of operations & you dont want to make many variables
you can always use StringBuffer or StringBuilder class where all operations are performed on original object without the need to create multiple new objects.......


String s1= "samba";
s1.toUpperCase();
then s1 will not automatically point to a new String variable at another memory location.
 s1 would still be pointing to the original String object, and the new String object that comes out of toUpperCase() will be ignored and thrown away.  If you wanted s1 to point to the new String, you must assign it explicitly:

Assign the result of the method to name
s1= s1.toUpperCase();

example:


package com.samba.org.sample;

public class StringImmutableTest {

public StringImmutableTest()
{
System.out.println("StringImmutableTest.StringImmutableTest()");
}

public static void main(String[] args)
{

String s1="samba";

System.out.println("Before String Operation hash code:"+s1.hashCode());
s1.toUpperCase();
System.out.println("After String Operation but nt assigned to any variable hashcode:"+s1.hashCode());
s1=s1.toUpperCase();
System.out.println("After String Operation and assigned to variable hashcode:"+s1.hashCode());

/*OUTPUT
*
* Before String Operation hash code:79649854
* After String Operation but nt assigned to any variable hashcode:79649854
* After String Operation and assigned to variable hashcode:78664766
                 *
*/
}

}





Friday, February 8, 2013

Prabhas Mirchi Movie Stills






Mirchi Movie Review

 

Prabhas shines but movie lacks it !

Mirchi is an upcoming Telugu Movie. Directed by Koratala Siva and Produced by V Samsi Krishna Reddy and Prmod. Music Composed by Devi Sri Prasad. Prabhas, Anushka and Richa Gangopadhya are in the lead roles.

After his last movie didn’t go as great as expected , there was a lot of hype that Prabhas will be back with ’Mirchi’ even though the young rebel did his best but the all-round performance of the entire cast was below par and leaves a lot to be desired. The sript writer’s transition into a director has not been good. Let me get on with the full review.

Story

Jai is an architect based in Italy, an optimistic who believes love changes everything.He becomes friends with a girl and then falls for her.He then follows her back to Mumbai where her family accepts him as their son -in-law. But then he has a background with a girl at a rival camp. Will that love blossom? How will the love triangle turn out to be, forms the crux of the story.

Performance

As I have stated earlier Prabhas has lined up to the hype his name has created for the movie.He looks handsome as always, acts brilliant with top notch dialogue delivery ans with wonderful screen presesnce and dance moves.Full marks to his performance.

Anushka’s girl-next-door act deserves appreciation as well. A girl hopelessly in love but torn between the rivalry of two families she wonderfully enters into the character. The overall screen presence and chemistry with Prabhas in the movie.

However, Richa’s performance has a dampening effect on the entire movie. Her acting skills and chemistry with Prabhas is below par. She could not match Anushka in any way on any level.

Another graceful performance was given by Sampath Raj. There are some comical moments that Brahmi gives you throughout the movie but it leaves the plot half-baked. Others have substantially less screen time and so I cannot comment on their performances.

Overall performance of the cast is still a dud.

Direction, Script and Cinematography

Koratala Siva is a good writer for sure. But all good writers cannot be good directors. The script offers nothing new. It is a routine and a vary predictable story which is not apt for a star like Prabhas.

The Screenplay and dialogues are also below par and the story does not connecct well and leaves the entire audience confused.

The cinematography is disappointing and the scene backdorps, fights does not look good and even the editin is too bad for a movie that is hyped this much.

Music
This is the only part of the movie that is great overall.The background score and songs give an immersive experience for the user.Surprisingly, the picturization of the songs are better than the rest of the movie.Full marks to the music.

Verdict
If you are a Prabhas fan, you are most likely to see it any way but if you are not, you can chuck it because its not worth it. Koratala Siva should do a better job next time.

Thursday, February 7, 2013

stringbuffer vs stringbuilder

StringBuilder was introduced in JDK 1.5. What's the difference between StringBuilder and StringBuffer? According to javadoc, StringBuilder is designed as a replacement for StringBuffer in single-threaded usage. Their key differences in simple term:
  • StringBuffer is designed to be thread-safe and all public methods in StringBuffer are synchronized. StringBuilder does not handle thread-safety issue and none of its methods is synchronized.

  • StringBuilder has better performance than StringBuffer under most circumstances.

  • Use the new StringBuilder wherever possible.

What happens when a Static Variable has the same name as a Static Class in Java?


public
class Test {
public static void main(String[] args) {
System.out.println(X.Y.Z);
  }
}

class
X {
static class Y {
static String Z = "Black";
}
static C Y = new C();
}
 

class
C {
String
Z = "White";
}

What Does It Print? Do not run it in eclipse and tell me the answer. I need to know why as well?

Ans: White


Reason :Outer static variable priority is higher than inner static variable.. 
You're hiding the class Y with a static instance of C named Y. The class Y is still there and can be used.

Try:
System.out.println(X.Y.Z);
System.out.println((new X.Y()).Z);
The output should be:
White
Black

Wednesday, February 6, 2013

== vs equals in Strings in Java

The equals( ) method compares the characters inside a String object. The == operator compares two object references to see whether they refer to the same instance. The following program shows how two different String objects can contain the same characters, but references to these objects will not compare as equal:

package
blogspot.sbollam.com
 public class Sample {
 public Sample()
 {
  System.out.println("Sample.Sample()");
 }

 /**
  * @param args
  */
 public static void main(String[] args)
 {


  String s1= new String("abc");
  String s2= new String("abc");
  String s3 ="abc";
  String s4 ="abc";
  System.out.println(s1==s3);
  System.out.println(s1==s2);
  System.out.println(s1.equals(s2));
  System.out.println(s1.equals(s3));
  System.out.println(s3.equals(s4));
  System.out.println(s3==s4);
  /*OUTPPUT:
   *
   * false false true true true true
   * */
 }

}


KNOWLEDGE HUB: Java Openigns -Infoys

KNOWLEDGE HUB: Java Openigns -Infoys: Hi All, In Infosys  Openings are there on Java 3+ . Please send u r profiles to sambamca06@gmail.com Note:Plz send only genuine profi...

StringUtils.isNotEmpty() VS StringUtils.isNotBlank() in Java

isNotEmpty

public static boolean isNotEmpty(String str)
Checks if a String is not empty ("") and not null.
 StringUtils.isNotEmpty(null)      = false
 StringUtils.isNotEmpty("")        = false
 StringUtils.isNotEmpty(" ")       = true
 StringUtils.isNotEmpty("bob")     = true
 StringUtils.isNotEmpty("  bob  ") = true
 



Parameters:
str - the String to check, may be null

Returns:
true if the String is not empty and not null



isNotBlank

public static boolean isNotBlank(String str)
Checks if a String is not empty (""), not null and not whitespace only.
 StringUtils.isNotBlank(null)      = false
 StringUtils.isNotBlank("")        = false
 StringUtils.isNotBlank(" ")       = false
 StringUtils.isNotBlank("bob")     = true
 StringUtils.isNotBlank("  bob  ") = true
 



Parameters:
str - the String to check, may be null

Returns:
true if the String is not empty and not null and not whitespace








Java Openigns -Infoys

Hi All,

In Infosys  Openings are there on Java 3+ .

Please send u r profiles to sambamca06@gmail.com

Note:Plz send only genuine profiles.

Pawar Star Pavan Kalyan








StringUtils.isEmtpty() vs StringUtils.isBlank() in Java



1) isEmpty

public static boolean isEmpty(String str)
Checks if a String is empty ("") or null.

StringUtils.isEmpty(null) = true
StringUtils.isEmpty("") = true
StringUtils.isEmpty(" ") = false
StringUtils.isEmpty("bob") = false
StringUtils.isEmpty(" bob ") = false


2) isBlank

public static boolean isBlank(String str)
Checks if a String is whitespace, empty ("") or null.

StringUtils.isBlank(null) = true
StringUtils.isBlank("") = true
StringUtils.isBlank(" ") = true
StringUtils.isBlank("bob") = false
StringUtils.isBlank(" bob ") = false

Difference between NULL and empty string in Java

What is difference between null string (String abc = null) and empty string (String abc = "") ?

Analysis:
--------
Try to call a method on both of them and you'll see the difference


  1. String s = "";   s.length();  
you actually declare a new String Object, and it means the variable (in this case - s) has a String Object associated to it. you can call String methods on that object.
it is like typing:
              String s = new String();
  if you type:   String s = "";   s.lentgh; // return 0  

   2.   String s = null;   s.length();
    s.lentgh;//returns a null pointer exception

 Basically a reference to an empty string points to an object in the heap so you can call methods on it. But a reference pointing to null has no object to point in the heap and thus you'll get a Null Pointer Exception