Posts

Introduction to Object Oriented Programming in Java

1.Class- Class is the blue print or boiler plate of our project. It consists of attributes(Colour, names and model) and non static methods(functions like turnOn( ); etc) of objects. Microphone Class //Microphone class public class CreatingClass { //Atrributes String name = "sony" ; String colour = "Blue" ; int model = 123 ; //Methods public void turnOn (){ System . out . println ( "Turned on" ); } public void adjustVol (){ System . out . println ( "Volume adjusted" ); } public void turnoff (){ System . out . println ( "Turned off" ); } public void description (){ System . out . println ( this .name + " is my brand. " + "My colour is " + this .colour); } } Main class public class CreatingClassMain { public static void main ( String [] args ) { CreatingClass Microphone1 =new CreatingClass (); Microphone1. turnoff ();

Java Number Program

Java Array Problems

Java Program to Find Largest Number in an array public class A_MaxNumInArray { public static void main ( String [] args ) { int [] array = { 4 , - 3 , 7 , 100 , 89 , 45 , 99 }; //Find the largest number in this array. //Logic- // 1. We consider the 1st number highest(int max). // 2. store values of array in j after each ilteration. // 3. if j>max then max=j. int max = Integer . MIN_VALUE ; for ( int i = 0 ; i < array.length;i ++ ){ int j = array[i]; if (j > max){ max = j; } } System . out . println ( "The max number is: " + max); } } Java Program to Find Smallest Number in an array public class A_MinNumInArray { public static void main ( String [] args ) { int [] array = { 100 , 39 , - 90 , 45 , 3 , 1 , 57 }; //Find the minimum number from the array. //Logic- //1. let 1st number be minimum(in
❤️  প্রেম আমার অজুহাতে কি  প্রিয়রে দূরে রাখা যায়? মনে প্রেম, স্মৃতির ক্ষত বেড়ে যায়। তোমার চোঁখ গুলো চোঁখে প্রিয় থেকে যায়, কত চেয়েছি তোমারে সব অছিলায়।       (সব অছিলায়- All in vain) ভালোবাসি তোমারে তাই,  তোমারে খুঁজে বেড়াই , চেনা অচেনা পথে পথে।  তোমারে দেখলে ছুটে পালাই, অনিয়মে হেঁটে যাই, ভেজা চোখ মুছে বারে বারে। আমার অস্থিরতায় নীরবতায়, তুমি জড়িয়ে আছো আমার কোথায়। যদিও অনিষ্ট চাও অভিমানে, আকাশে উড়াবো দীপ তোমারই নামে।  জানি আছো এ শহরে তাই, ফিরে এসে বার বার, খুঁজি এখানে ওখানে। না দেখতে পেলে তোমায়, ক্লান্ত পা ভেঙে যায়, হাত ছুটে কপালের ভাজে।  বুঝেও না বুঝার ভান করে থাকবে, মিথ্যে না হেঁসে ভাই বলে ডাকবে, আমি রাজি আছি নতুন নামে, আমি হাসবো আমার বুকে কাঁদবে।  আড়ালে দেখতে পেলে তোমায়, ঠোটে হাসি খুঁজে যাই, নিখোঁজ ভাব কি অভিমানে? তোমার নামে গান লিখে যাই, জাহাজে জলে ভাসাই,  দাঁড়িয়ে দেখো কি আনমনে? ভালোবাসি তোমারে তাই,  ❤ তোমারে খুঁজে বেড়াই ,🔍 চেনা অচেনা পথে পথে।  তোমারে দেখলে ছুটে পালাই, অনিয়মে হেঁটে যাই,ভেজা চোখ মুছে বারে বারে।