Skip to main content

JAVA FUNDAMENTALS| DAY-01| PART-02

Class Notes:

package basicJava;

public class Car {

// Class scope starts here

//Class scopes are GLOBAL but METHOD scope is LOCAL

//Core concepts of Java

/* * Multiline comments * Comments - are two types: 1)Single-line comment // * Class - is nothing but a blueprint/design/template * to create Object /end product * What do we find inside Class? * - Inside the class we find * 3 things/ class members: 1) States - Properties/ Attributes/ Fields * 2) Behaviors -> Methods/Actions/Functions * 3) Main() methods * Variable - is nothing but a container that stores/hold data */

String name = "Tesla";

//Strings go inside quotation marks

int price = 100000;

// integer is a complete number These are states

public void run() {

//It is method and the Scope of the method starts here //Method is a block of code(s) that only runs/executes //when it is called by name

System.out.println("This is run method");

//Every Java code/program //end/terminates with a semicolon

}

////Scope of the method ends here

public void stop() {

//Scope of the method starts here //Method is a block of code(s) that only //runs/executes when it is called by name

System.out.println("This is stop method");

// EveryJava code/program end/terminates with a semicolon

}

public static void main(String[] args) {

//Entry point in Java //What is the purpose of creating Object? // The purpose of creating object is to access/use all the // properties/States and methods/behavior of the class

Car car1 = new Car();

//How can I access/use the methods and properties // I can access the methods and properties creating object. Then, I have to use 'reference variables' to the object // with dot(.) operator

car1.stop();

car1.run();

System.out.println("The name of the car is: " + car1.name);

System.out.println("The price of the car is: " + car1.price);

}

}

// Class scope ends here

Comments

Popular posts from this blog

Cannot Afford $4k Boot Camp Fees? Join the Free Full Stack QA Boot Camp - Sign up now

সফটওয়্যার টেস্ট অটোমেশন - এ আপনাকে স্বাগতম।  Cannot afford course fees? Please click here and register with Free Boot Camps. আমাদের অনেকেই ইংরেজি জানলেও চাই মায়ের ভাষায় প্রযুক্তির বিষয়গুলো শিখতে। কিন্তু আমাদের সে সুযোগ খুবই সীমিত। ফলে প্রযুক্তির কোর কনসেপ্টগুলো অনেক সময় আমাদের ভাল করে জানা হয় না, শেখা হয় না খুঁটিনাটি বিষয়।  কোর্স ডিটেইলস জানতে এখানে ক্লিক করুন। আমাদের কোর্স ফিস গুলো জানতে এখানে ক্লিক করুন ।   কোর্স এর পুরো রোড ম্যাপ জানার জন্য এখানে ক্লিক করুন ।  আমরা চাই, যাদের কোর্সে যোগ দেওয়ার আর্থিক সক্ষমতা নেই তাঁরাও পিছিয়ে না থাকুন। মূলতঃ যাদের আর্থিক সঙ্গতি নেই, তাঁদের জন্যই আমরা এখানে প্রতিদিন ১ টি করে বাংলায় ভিডিও টিউটোরিয়াল পোস্ট দিচ্ছি।  আমাদের অনলাইন কোর্স সমূহঃ  ১) Java Programming for Non-programmers - কোর্স টি এক পলক দেখে নিতে এখানে ক্লিক করুন ।  ২) Java Object Oriented Programming -  কোর্স টি এক পলক দেখে নিতে এখানে ক্লিক করুন ।   ৩) Software Testing: JUnit Test for Web Developers & QA Test Engineers -  কোর্স টি এক পলক দেখে নিতে এখানে ক্লিক করুন ।  ৪) Python Prog

HOW TO SET UP TestNG TEST FRAMEWORK ENVIRONMENT? TESTNG FRAMEWORK| TESTN...

JAVA CORE CONCEPT - 01| JAVA FOR QA TEST AUTOMATION| JAVA FOR SOFTWARE T...