Maya Karthik

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

Recent posts by Maya Karthik

Hi
Thank you for the reply
This was the code which i tried
StringBuffer sb = new StringBuffer();
sb.append("BEGIN:VCALENDAR\n"
+ "PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN\n"
+ "VERSION:2.0\n"
+ "METHOD:REQUEST\n"
+ "BEGIN:VEVENT\n"
+ "ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:abc@yahoo.com\n"
+ "ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:efg@yahoo.com\n"
+ "ORGANIZER:MAILTO:\n"
+ "DTSTART:20090515T053000Z\n"
+ "DTEND:20090515T060000Z\n"
+ "LOCATION:Conference room\n"
+ "TRANSP:OPAQUE\n"
+ "SEQUENCE:0\n"
+ "UID:040000008200E00074C5B7101A82E00800000000002FF466CE3AC5010000000000000000100\n"
+ " 000004377FE5C37984842BF9440448399EB02\n"
+ "DTSTAMP:20051206T120102Z\n"
+ "CATEGORIES:Meeting\n"
+ "DESCRIPTION:This the description of the meeting.\nPlease attend\n\n"
+ "SUMMARY:Test meeting request\n" + "PRIORITY:5\n"
+ "CLASS:PUBLIC\n" + "BEGIN:VALARM\n"
+ "TRIGGER:PT1440M\n" + "ACTION:DISPLAY\n"
+ "DESCRIPTION:Reminder\n" + "END:VALARM\n"
+ "END:VEVENT\n" + "END:VCALENDAR");
return sb;

Here in the calendar request only "This the description of the meeting." is coming.
15 years ago
Hi
I am trying to send the meeting invitation mails using java.
I could do it with the help of some code which i got from sun's forum.
But it allows me to have a description of only one line in the calendar.It takes only one line.
How can i have a description which have more than one line added to it?
Please help :
banghead:.
Thank You,
15 years ago
Thank you very much Vijay.I got it.
Hi,

Can anybody please explain the working of the below code?not clear with the syntax " (new Bar() {}).go();"

public class Foo {
Foo() {System.out.print("foo");}
class Bar{
Bar() {System.out.print("bar");}
public void go() {System.out.print("hi");}
}
public static void main(String[] args) {
Foo f = new Foo();
f.makeBar();
}
void makeBar() {
(new Bar() {}).go();
}
}

Thank you
Maya
Hi Rajshekhar,

The exclusive OR operator works as follows:

true ^ true = false
true ^ false = true
false ^ true = true
false ^ false = false

when both the operands are of the same value whether it is true or false, the result is false. Otherwise the result is true.Hope this clarifies.


Thanks,
Maya
Hi Ritchie

hashCode() returns a unique value for any object on which it is called rite? I was thinking the same way for map object also. Please see the following code:

String str[]={"abc","111","xyz"};
Map map=new HashMap();
for(int i=0;i<str.length;i++)
{
map.put(new Integer(i),str[i] );
System.out.println(map.hashCode());
}

Here after the put operation it printed different values for hashCode()[It was called on the same object, map].

Quoting you, "Well, of course it would be different every time you change it structurally." How does that happen?? Does it create a new map object when we put a new object into it? Please clarify.

Thanks in advance,
Maya
16 years ago
Hi Kaushik,

This is the code which i ve been trying.

String str[]={"abc","111","xyz"};
Map map=new HashMap();
for(int i=0;i<str.length;i++)
{
map.put(new Integer(i),str[i] );
System.out.println(map.hashCode());
}

I tried your code changing the objects we put into the map.It gave a diiferent hashCode() then. I think you got the same hashCode() coz
hi.put("","");
hi.put("","");
here the objects we put are same.But How does it work?Coz the key cant be a duplicate one rite?

Thanks,
Maya
Hi friends,

What does it print when the hashCode() method is called on a Map object?
Each time i put an object to the Map it prints a different value for hashCode(). How is that working?


Thanks,
Maya
Hi friends,

What does it print when the hashCode() method is called on a Map object?
Each time i put an object to the Map it prints a different value for hashCode(). How is that working?


Thanks,
Maya
16 years ago
Hi

Since the result of arithmetic operation is an int, here also even though the operands are of byte type it gives an int result. So we have to explicitly type cast.