@Radha Rajendran - Currently there is no any sample available in java to create a outgoing webhook.
You can refer below sample for reference which is in C# and nodejs.
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/outgoing-webhook
Thanks,
Nivedipa
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.