1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vovangra [49]
2 years ago
5

What are the oop concept of java

Computers and Technology
2 answers:
qaws [65]2 years ago
7 0

OOP stands for Object Oriented Programming. In Java, we create classes to represent different things. For instance:

public class MyClass {

   public static void main(String args[]) {

     Car cr = new Car();

     cr.createCar("Ford", "Green", 2000);

     cr.printInfo();

   }

}

class Car{

   private String model, color;

   private int year;

   

   void createCar(String md, String cl, int yr){

       model = md;

       color = cl;

       year = yr;

   }

   void printInfo(){

       System.out.println("Car Info:");

       System.out.println("Model: "+model);

       System.out.println("Color: "+color);

       System.out.println("Year: "+year);

   }

}

We create a car object derived from the Car class with whatever properties we want and then we can display the properties of our car with the printInfo() method.

This is just one example of the OOP concept of Java.

mash [69]2 years ago
4 0

Answer: OOP concepts in Java are the main ideas behind Java’s Object Oriented Programming. They are abstraction, encapsulation, inheritance, and polymorphism. Grasping them is key to understanding how Java works. Basically, Java OOP concepts let us create working methods and variables, then re-use all or part of them without compromising security.

HOPE THIS HELPED IS NOT SORRY.

You might be interested in
What test must you pass to get you're operators licence
Alina [70]
Behind the wheel, the Florida driving test, turn about, shifting gears, parking, backing up, stop quickly, stop signs, signal & turns
5 0
3 years ago
it is a program a personal computer microprocessor uses to get the computer system started after you turn it on​
Fofino [41]

Explanation:

please repeat your question

5 0
3 years ago
17. Write a SELECT query for the palateE4 database that produces a result grid listing paintName, and a count of the occurrences
GaryK [48]

Answer:

SELECT paintname, COUNT(paintname) as count_paintname

FROM paint

GROUP BY paintname HAVING COUNT(paintname) > 2

ORDER BY paintname

Explanation:

The structured query language or SQL statement returns two columns of paintname and the count of the distinct paint names in the paint table with rows of grouped paint names greater than two and in the ascending order of the names.

4 0
2 years ago
There are many advantages and some disadvantages to using social media. Explain at least one of the advantages to
OverLord2011 [107]

Answer:  yes

Explanation:social media has the advantage of long distance communication and a disadvantage is cyber bullying and yes i thank if most people where nice long social media is good  

3 0
3 years ago
Consider this data sequence: "fish bird reptile reptile bird bird bird mammal fish". There is a CONSECUTIVE REPETITION of length
ioda

Answer:

The code is given below. Follow the question and the code definitions for better understanding.

Explanation:

#include<iostream>

#include<string>

using namespace std;

int main(){

string pastWord="";

string currentWord,nextWord;

int n,t;

int singleton=0;

int consecutive=0;

cout<<"Enter words. ('xxxxx' to exit):\n";

cin>>nextWord;

do{

currentWord=nextWord;

cin>>nextWord;

if ( (currentWord!=pastWord)&&(currentWord!=nextWord) )

singleton++;

else if((currentWord==pastWord)&&(currentWord!=nextWord))

consecutive++;

pastWord=currentWord;

}while(nextWord!="xxxxx");

n=singleton;

t=consecutive;

cout<<"There were "<<n<<" singletons and "<<t<<" consecutive repetitions.";

cin.get();

return 0;

}

8 0
3 years ago
Other questions:
  • F we are reduced to a set of computer algorithms, how do we differentiate ourselves from our programming or our connectome? is i
    8·1 answer
  • Four workers take an extra half-hour for lunch, at a cost of $14/ hour
    13·1 answer
  • Assume that the following variables have been defined in a program: int x = 10; int y = 20; int z = 30; Write a cout statement t
    11·1 answer
  • You are contacted by a project organizer for a university computer science fair. The project organizer asks you to hold a forum
    10·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in order), how would the first-fit, best-fit,
    10·1 answer
  • Why might a business choose a server-based network over a peer-to-peer network?
    15·1 answer
  • In which of these areas can software engineers specialize?
    10·1 answer
  • ....is an act of introducing an invention into market on business basis for profit​
    12·1 answer
  • Rewrite the Espresso Counter program to Swap or interchange any two rows of the output. Copy and paste just the interchanged par
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!