vipin raimcs

Greenhorn
+ Follow
since Sep 26, 2008
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vipin raimcs

Hi Friends,


I have one doubt about marks distribution in SCJP exams. How they give the marks, like -
1) Suppose we have 4 options and out of that 3 ans are correct and you checked on 2 correct answers. What marks will you get?
2) If you checked on 2 right and one wrong ans then what would be your marks then?


Can anyone provide the details for this?

Thanks.
Both are invalid syntax for declaring of constant char. Hence, compiler complaining for that.
Thanks for your opinion and support. Atleast you spended so much time for me and given me useful tips. I will keep this in mind.

But I want to tell you that i cannt provide the code as its of business use. what i am doing, normally trying to create a SSLsocket and trying to access the getINputStream method on it as you can see on down side of exception list.

I googled not for 30 mins but 3-4 days for getting this to solved.

I solved this. Thanks to me and finally google too.

Hey man, thanks to you also.
java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.bmc.util.socket.PooledSocketInvocationHandler.invoke(PooledSocketInvocationHandler.java:127)

at $Proxy0.connect(Unknown Source)

at com.bmc.util.socket.ConnectionHelper.connect(ConnectionHelper.java:78)

at com.bmc.util.socket.SocketPool.createPooledTimedProxyAndConnect(SocketPool.java:711)

at com.bmc.util.socket.SocketPool.createSecureTimedSocket(SocketPool.java:251)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor$SocketWrapper.<init>(HttpInteractor.java:702)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor.createSocket(HttpInteractor.java:639)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor.main(HttpInteractor.java:664)

Caused by: com.rsa.ssl.SSLException: Unknown protocol

at com.rsa.ssl.common.ClientProtocol.sendHello(Unknown Source)

at com.rsa.ssl.common.ClientProtocol.startHandshake(Unknown Source)

at com.rsa.ssl.SSLSocket.getInputStream(Unknown Source)

at com.bmc.util.socket.BasicSSLSocket.connect(BasicSSLSocket.java:72)

at com.bmc.util.socket.TimedSocketImpl.connect(TimedSocketImpl.java:41)

at com.bmc.util.socket.TimedSocketImpl.connect(TimedSocketImpl.java:33)

... 12 more

com.rsa.ssl.SSLException: Unknown protocol

at com.rsa.ssl.common.ClientProtocol.sendHello(Unknown Source)

at com.rsa.ssl.common.ClientProtocol.startHandshake(Unknown Source)

at com.rsa.ssl.SSLSocket.getInputStream(Unknown Source)

at com.bmc.util.socket.BasicSSLSocket.connect(BasicSSLSocket.java:72)

at com.bmc.util.socket.TimedSocketImpl.connect(TimedSocketImpl.java:41)

at com.bmc.util.socket.TimedSocketImpl.connect(TimedSocketImpl.java:33)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.bmc.util.socket.PooledSocketInvocationHandler.invoke(PooledSocketInvocationHandler.java:127)

at $Proxy0.connect(Unknown Source)

at com.bmc.util.socket.ConnectionHelper.connect(ConnectionHelper.java:78)

at com.bmc.util.socket.SocketPool.createPooledTimedProxyAndConnect(SocketPool.java:711)

at com.bmc.util.socket.SocketPool.createSecureTimedSocket(SocketPool.java:251)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor$SocketWrapper.<init>(HttpInteractor.java:702)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor.createSocket(HttpInteractor.java:639)

at com.bmc.guardianangel.application.webtransaction.webinteraction.HttpInteractor.main(HttpInteractor.java:664)
A a = new B(); is advisable to use, this is because of business purpose. Also creation of objects is left on some factory classes. So client code is totally unaware of the fact that what they are using. They just only know if A a.
14 years ago
Its not good practise to write the code as session.setAttribute("eno", resultset.getInt(1));
Please always avoid this things and use session.setAttribute("eno", new Integer(resultset.getInt(1)));
14 years ago
JSP
This depends upon where you want to use it. Just for nomral purpose its sufficient to override the equal method but sometimes its necessary to override the hashcode method.
Except class variables, all the variables are thread safe. But if you defined the local variables that's very good. All local variables are thread safe. All local variables are created at the stack, for each thread there are separate stacks created. So thread cannt interfere with each other.
that's true that there would be performance hit if we used synchronization over entire method so its better to use synchronize block and do the checks which have done before for safety.