Mintoo kumar

Ranch Hand
+ Follow
since Aug 21, 2007
Merit badge: grant badges
For More
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 Mintoo kumar

Hi,

I have a method which have return boolean based on condition ,so i have two retrun statement in a method.I just wanted to know , is it wrong to have two return statment in a method. method is as follow as ..
___________________________________________________________

private boolean isInvalid(String value) {
String sVal[] = { "000000000", "111111111", "222222222", "333333333" };
for (int index = 0; index < sVal.length; index++) {
if (sVal== null || sVal[index].equals(value) ){
return true;
}
}
return false;
}// end of method
______________________________________________________________
Is the above method wrong ,because of it is having two return statemtnts.

Thanks in advance.
15 years ago
Thanks Madhavi , I got it.
15 years ago
Hi All ,

thanks for the suggestation.But my Query was abit diff.
like . i using the query

Select *
From myTable
Where rownum Between 1 and 20
Order By rownum

What i need to do is , i need to keep changing the limits like on first request is 1 and 20 ,then on second request i would require data b/w 21 to 30.

I have tried the same query in oracle but after changing the limit like 21 to 30 .it does not give any output.

Suggest me if anything i have left or need to alter in the query, m using oracle as DB.

Thanks in advance.
15 years ago
Thanks a lot ,it worked.
15 years ago
Thanks for the help.

But it seem LIMIT is not wokring in SQL. as i m using PL/SQL devloper editor. if any idea . let me know

Thanks in advance.
15 years ago
Hi all ,

I have more than 10000 records in database , due to size limit , i can not fetch all records at once.Therefore i just wanted to know is there any way that i can give size limit and get records step by step.
Like , first time i would get 100 records then another 100 and so on.

Thanks in advance.
15 years ago
Hi all ,

I am using log4j.properties. i have specified one File appender.
My requirment is that i need two seprate fileAppender.Like
if an error comes it should log in "error.log" , if not then it should log
"myLog.log".

Overall , i want seprate FileAppender for "error" and "myLog.log".Though i have created two logger objects.but they used the same FileAppender.

Does any body any idea?

Thanks in advance.
Hi all ,

I am using log4j.properties. i have specified one File appender.
My requirment is that i need two seprate fileAppender.Like
if an error comes it should log in "error.log" , if not then it should log
"myLog.log".

Overall , i want seprate FileAppender for "error" and "myLog.log".Though i have created two logger objects.but they used the same FileAppender.

Does any body any idea?

Thanks in advance.
[ June 26, 2008: Message edited by: Amit Kumar Jha ]
Thanks to all.

I got it.
15 years ago
Folks,

i have following lines of code.
_________________________________
short s = 1;
byte b = s; // compiler to error .
_________________________________

It's ok.i understand.but what if i write the above line in way like

_____________________________________________________

final short s1 = 1;
byte b = s; // no error . it works
_____________________________________________________

It means we can't assign final to non-final ?
Does anybody have any idea what's the reason.

Thanks,
Amit
15 years ago
Hi Folks,

I have just started practising JNDI but facing some basic problem.
Just wanted to play with directory and files in my system to get understanding of JNDI.

I have written following CODE
__________________________________________________________________
javax.naming.Context c = new javax.naming.InitialContext(System.getProperties());
Object o = c.lookup("c:\");

_______________________________________________________________

if i simply run my class after removing "Object o = c.lookup("c:\").
it gives same error , i am posting my error below.
ERROR:
_________________________________________________________________
ERROR! Shared library ioser12 could not be found.
javax.naming.NamingException: Error accessing repository: Cannot connect to ORB
at com.sun.enterprise.naming.EJBCtx.<init>(EJBCtx.java:51)
at com.sun.enterprise.naming.EJBInitialContextFactory.getInitialContext(EJBInitialContextFactory.java:62)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at jndi.TestJndi.main(TestJndi.java:18)
_____________________________________________________________________
before posting the message I have searched the previous post but could not able to find anything useful.
If anybody have idea. do let me know.
Hi all,

I have one query

___________________________________________________________________________
SELECT TO_CHAR(TO_DATE('05/14/2008 11:20:25PM', 'MM/DD/YYYY HH12MISS'), 'YYYY/MM') FROM myDB;

___________________________________________________________________________

i have time stamp in database in format like '05/14/2008 11:20:25PM'.
i want it to convert into format like YYYY/MM.However i have tried the aboce query but could not get the desired result.

I am using PLSQL devloper as a editor and my databae is in oracle.

Does anybuddy have anyidea. how to do.
15 years ago
try this jar -cvf my.jar com*( instead of com* , you can place whatever package you want to include).

Hope it helps.

_____________________
Mintoo
SCJP 1.4
______________________
15 years ago