Anish Nagraj

Greenhorn
+ Follow
since Feb 27, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anish Nagraj

My application has got a textarea where i have got to display a text which should not be deleted or altered by the user, where as the same user should also be able to enter his own text immedietly after the non-editable text ends.
The non-editable text should be displayed in a different color where the user entering text should be in a different color.
My application has got a textarea where i have got to display a text which should not be deleted or altered by the user, where as the same user should also be able to enter his own text immedietly after the non-editable text ends.
The non-editable text should be displayed in a different color where the user entering text should be in a different color.
I have got a situation where I have got to repalce the <title> tag in html with a jsp tag where the contents of that tag should be displayed only under certain conditions.

Kindly let me know a solution for this.
18 years ago
JSP
I am able to write the contents in the textarea to the browser but I am not able to retain the line breaks.

How can I write the contents of a textarea to the browser retaining the line breaks as it is in the text area ?

Is there any attribute for <html:textarea> tag in JSP like the one in Html which is as follows :
<textarea wrap="hard">
18 years ago
public class Joining {

static Thread createThread(final int i, final Thread t1){

Thread t2 = new Thread(){
public void run(){
System.out.println(i+1);
try {
t1.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(i+2);
}
};

System.out.println(i+3);
t2.start();
System.out.println(i+4);
return t2;
}

public static void main(String[] args) {

createThread(10, createThread(20, Thread.currentThread()));
}
}

can any body explain me the flow of this program?
What does join() actually do here?
Does the static specified for the method 'Joining' makes any change? Because I get different answers if and if not static is present
Plz help me...
public class primitives {

public static void main(String[]args) {

int x = 0;
labelA :
for(int i =10; i<0; i--){
int j=0;
labelB:
while(j<10){
if(j>i) break labelB;
if(i==j){
x++;
continue labelA;
}
j++;
}
x--;
}
System.out.println(x);
}

}

This program gives me output as 0
I am not able tp know the flow... plz help
what would b printed in the console when printing using System.ou.println();

char c = \u0033;
System.ou.println(c);


char c = 65535;
System.ou.println(c);


char c = 0xffff;
System.out.println(c);


char c = 889;
System.ou.println(c);


what wil b the output of each one.
plz help me on this... bcoz what ever the first c i get '.' and if i print the other three i get '?'
Can any one help me in finding more about this..

i had a question like whether the following is poosible...

char c = \u0022;
this raises a compiler error... but i came to know this later only bcoz
when i was studying about char i was tryin something like this...

char c = \u0030;
it accepted til \u0039 without any single quotes...
what range is this actually...
something which ever i tried without '' other than this range raises an error... i whant to know if there is any another such range like this...
when i print it on the cosole it prints just '.' for all the literal from \u0030 to \u0039...
plz help me on this...
what does this statement meann
if(true);
is it meaningless... how does a copiler looks at it..
plz explain...
I am really really sorry...
here is the actual culprit...

class JMM112 {
public static void main (String[] args) {
int j = 0;
for (int i = 0; i++ < 2 do
System.out.print(i);
while (j++ < 2);
}}

i am not clear with any of such lopps... which was there in all the previous examples... plz explain me this one...
sorry.... that was a differnt one... the actual one is

class JMM113 {
public static void main (String[] args) {
int i = 0, j = 0, k = 0;
do while (i++ < 3)
System.out.print(k++);
while (j++ < 3);
}}

for which i get 121212...
plz explain
class JMM114 {
public static void main (String[] args) {
int i = 0, j = 0;
while (i++ < 3) do
System.out.print(j);
while (j++ < 3);
}}

i get answer as 121212
Plz explain me how the flow goes...
How does this work... Plz explain...



i get the result as 121212
no way i am able to trace the flow... plz explain me abt this ...

[ADDED Code Tags to make code readable. Mark]
[ March 03, 2006: Message edited by: Mark Spritzler ]