Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

prema venkat

Greenhorn
+ Follow
since Sep 27, 2006
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 prema venkat

Hi All,
Please clarify my doubt.
If i am having 2 business methods in remote interface of EJb and i am implementing(definition) only one in the bean class but i am not getting any error.

Please tell me the relation between remote interface and bean class.For my understanding it should have both method in the bean class.
Thanks a lot for your advice and idea.In my view that is not a good one.
So i qiut that offer.

Thanks a lot for your advice.I am having hope to get a good job than this
13 years ago
hai guys,
I am having 2 years experience in java/j2ee.Yesterday one consultant is called me and told that one top most company short listed your resume your having telephonic interview tommorrow.I told "ok"
Today that company conducted the interview.After few hours the intimate me that your placed but you have to joined within 7 days not as a fulltime employee as that consultant employee for 6 months then only you are coming our full time employee.

I am not interested in that concept..But i want an immediate change in my carrier.Please guide me regarding my job

Thanks in advance,
Prema.
13 years ago
You will get the output as 2.
The value of a[0] is 1.After calling increment method the value become 2 by post increment operator.
So the output is 2.

In the line below
-----------------
i[i.length - 1]++;
-----------------
the value of i.length is 1 so 1-1=0;i[0]=1;
after that i[0]++;so i[0]=1+1=2;


So the value of a[0]=2

Regards,
Premavenkat.
hai Manoj,
Yes you can get the output as 10 because while runtime first static block will run before main method.In that code you terminating that program after static block you will get the output of 10.
If that wont have

------------------------
System.exit(0);
------------------------
in your program you will get NosuchMethodError after printing 10 like this
10
Exception in thread "main" java.lang.NoSuchMethodError: main


For more detail modify your program by
-------------------------------------
public class QTest{
static{
print(10);
}
static void print(int x){
System.out.println(x);
}
public static void main(String arg[])
{
System.out.println("i am in main");

}
}
-------------------------------------------
You will get the output as:
10
i am in main.
From this you come to know that after static block only main will run.

Regards,
Premavenkat.
hai anil,
In that program your delimiter is "digit".
So in the argument ("ab5 ccc 455 67 @")
the tokens are

>ab<
> ccc<
>< //line 1
>< //lien 2
> <
>< //line 3
> @<
The line 1,2,3 came because 4is one delimiter after that immediate delimiter 5 so they took as empty(>< token.

Try the output with this:java SplitTest "ab5 ccc 45 5 67 @" "\d"


You will get:
count 7
>ab<
> ccc <
>< \\\1
> <
> <
>< \\\2
> @<
1,2 is giving empty token because you are having continues delimiter.

Now you are clear with this spilt() .
Regards,
Premavenkat.
Yes Guru.I got the point.Thanks.
Thanks Chris.Now i am clear with this.
could you please send me the SCJP materials to premvenkat14@gmail.com Thanks, Prema.
Javier,

Congrats. Please share your materials with me to write this exam.
Thanks,
Prema
13 years ago
hai armen,
i too want the material.Please send this to premvenkat14@gmail.com
Thanks in advance.
hai all,
i cant understand the difference between override and redefine of a sstatic method.
we know static cant be override but we can redefine in subclass means what it mean?

for example:
class Animal
{
static void daStuff() //Line 1
{
System.out.println("a");
}
}
class Dog extends Animal{
static void daStuff() //line2
{
System.out.println("d");
}
public static void main(String arg[])
{
Animal[] a={new Animal(),newDog(),newAnimal());
for(int x=0;x<a.length;x++)
a[x].doStuff();

}
}

Here line 2 seems like an override of line 1 but in the defination of this program it seems like line2 is redefinition not override.(coz static)

Please clear by doubt that how the redefinition differs from override coz its having same modifier and return type as like override.

Thanks in advance
Hai friends,
I am going to write SCJP1.4 exam.I am preparing for that exam,i want more information about that exam,What are all the books i have to read and i want the clear syllabus of the same.Please guide me to succeed in this exam.
Thanks in Advance.
13 years ago
Hai
Hai friends,
I am going to write SCJP1.4 exam.I am preparing for that exam,i want more information about that exam,What are all the books i have to read and i want the clear syllabus of the same.Please guide me to succeed in this exam.
Thanks in Advance.
13 years ago