আজ আমরা জাভার তিন ধ্ভরণের ভেরিয়েবল (Local, instance,static or class) প্রাক্টিকেলি জানব।
প্রথমে নিছের কোড টি দেখিঃ
[code lang="java"] public class Variable { static int b=10; int c=10; public static void main(String args[]){ int a=10; System.out.println(a); System.out.println(b); Variable ob=new Variable(); System.out.println(ob.c); } } [/code]
instance variable:
আমরা উপরে ৩ নাম্বার লাইন এ দেখছি এটি static int b=10; এটি হচ্ছে static or class variable.
এটি class এর মধ্যে এবং method এর বাহিরে থাকে। কিন্তু static লেখা থাকে সুরুতে class হল Variable এবং method হল
Main .আসাকরি সবাই বুঝতে পেরেছেন।
Static or Class variable:
আমরা উপরে ২ নাম্বার লাইন এ দেখছি এটি int c=10; এটি হচ্ছে instance variable. এটি class এর মধ্যে এবং method এর বাহিরে থাকে।এখানে class হল Variable এবং method হল Main .আসাকরি সবাই বুঝতে পেরেছেন।
Local Variable:
আমরা উপরে ৫ নাম্বার লাইন এ দেখছি এটি int a=10; এটি হচ্ছে local variable. এটি method এর মধ্যে থাকে।এখানে method হল Main .আসাকরি সবাই বুঝতে পেরেছেন। ধন্যবাদ। বুঝতে সমস্যা হলে টিউমেন্ট
atorvastatin 20mg us buy lipitor without a prescription buy lipitor 10mg pill
atorvastatin pills where to buy atorvastatin without a prescription lipitor 80mg canada
order cipro 500mg – keflex pills order augmentin 375mg sale
order baycip without prescription – buy keflex medication order amoxiclav sale
purchase baycip online – septra buy online order augmentin 625mg online cheap
ciprofloxacin us – clavulanate pill augmentin where to buy
zidovudine 300 mg tablet – avapro buy online order allopurinol 100mg sale
buy clozapine for sale – tritace oral cheap pepcid
clozaril 100mg cost – pepcid 20mg sale order pepcid 40mg