both r same but method does't return any thing and function returns any thing