CodeGym/జావా కోర్సు/మాడ్యూల్ 2: జావా కోర్/స్థాయికి అదనపు పాఠాలు

స్థాయికి అదనపు పాఠాలు

అందుబాటులో ఉంది

జావాకు ఇంటర్‌ఫేస్‌లు ఎందుకు అవసరం

ఈ పాఠంలో , మేము జావాలో ఒక ముఖ్యమైన భావన గురించి మాట్లాడుతాము: ఇంటర్‌ఫేస్‌లు. మీకు బహుశా ఈ పదం తెలిసి ఉండవచ్చు. ఉదాహరణకు, ఇంటర్‌ఫేస్‌లు చాలా కంప్యూటర్ ప్రోగ్రామ్‌లు మరియు గేమ్‌లలో భాగం. విస్తృత కోణంలో, ఇంటర్‌ఫేస్ అనేది ఒక రకమైన "కంట్రోల్ ప్యానెల్", ఇది రెండు పరస్పర చర్య చేసే పార్టీలను కలుపుతుంది. జావాలో ఈ పదానికి సరిగ్గా అర్థం ఏమిటో తెలుసుకోవడానికి పాఠాన్ని చూడండి.

ఉపయోగకరమైన పదార్థాలు

ఈ సంక్షిప్త కథనాల రచయిత వ్రాసినట్లుగా, ఇంటర్‌ఫేస్‌లను ఎలా సృష్టించాలో కనుగొన్న వారికి, ఇంటర్‌ఫేస్ వారసత్వం ఎలా పనిచేస్తుందో అర్థం చేసుకున్న మరియు అనేక ఉదాహరణలను అమలు చేసిన వారికి ఈ పదార్థాలు ప్రయోజనం చేకూరుస్తాయి, కానీ ఇప్పటికీ ఎందుకు అర్థం కాలేదు. దిగువన ఉన్న మెటీరియల్ ఇంటర్‌ఫేస్‌ల "అప్లికేషన్"ను సూచిస్తుంది:

వియుక్త తరగతులు మరియు ఇంటర్‌ఫేస్‌ల మధ్య వ్యత్యాసం

ఈ పాఠంలో, ఇంటర్‌ఫేస్‌ల నుండి వియుక్త తరగతులు ఎలా విభిన్నంగా ఉంటాయో మీరు నేర్చుకుంటారు మరియు మీరు సాధారణ వియుక్త తరగతుల ఉదాహరణలను చూస్తారు.

వియుక్త తరగతి మరియు ఇంటర్‌ఫేస్ మధ్య వ్యత్యాసం ముఖ్యమైనది. మీ భవిష్యత్ ఉద్యోగ ఇంటర్వ్యూలలో 90%లో ఈ భావనల మధ్య వ్యత్యాసం గురించి మీరు అడగబడతారు. కాబట్టి మీరు చదివినది ఖచ్చితంగా అర్థం చేసుకోండి.

జావా ఉద్యోగ ఇంటర్వ్యూల నుండి వియుక్త తరగతులు మరియు ఇంటర్‌ఫేస్‌ల గురించి 10 ప్రశ్నలు

ఈ ఆర్టికల్‌లో , వివిధ స్థాయిలలో జావా సాఫ్ట్‌వేర్ డెవలప్‌మెంట్ స్థానాల కోసం ఉద్యోగ ఇంటర్వ్యూలలో అడిగే వియుక్త తరగతులు మరియు ఇంటర్‌ఫేస్‌లకు సంబంధించిన అత్యంత సాధారణ ప్రశ్నలను మేము పరిశీలిస్తాము. అనుభవం లేని జావా ప్రోగ్రామర్‌లకు కూడా చాలా వరకు స్పష్టంగా ఉంటాయి. అవి ప్రధానంగా ఓపెన్-ఎండ్ ప్రశ్నలు, అయితే వాటిలో కొన్ని గమ్మత్తైనవి, జావాలోని వియుక్త తరగతులు మరియు ఇంటర్‌ఫేస్‌ల మధ్య వ్యత్యాసాన్ని వివరించడం లేదా ఇంటర్‌ఫేస్‌పై వియుక్త తరగతిని ఎప్పుడు ఎంచుకోవాలో వివరించడం వంటివి.

8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Bridges
Create a Bridge interface with a getCarsCount() method that counts cars. Write WaterBridge and SuspensionBridge classes that implement this interface. The getCarsCount() method must return any constant int value. This value must be different for different classes.
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Wine tasting
30% of the robots on Planet Soto have an alcohol dependence, which causes anxiety among the remaining 70%. More precisely, the 30% are addicted to alcohol-related programs. We are talking about robots, after all. But now it's your chance to do the same!
16
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
User, loser, coder and programmer
1. Enter a few strings (keys) from the keyboard [in a loop]. The following strings (keys) are allowed: "user", "loser", "coder", "programmer". Stop reading in strings after reading in any string that does not match one of the above. 2. For each entered string: 2.1. Create the appropriate object [see Person.java], e.g.
4
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Implement the printMainInfo method
Write an implementation of the printMainInfo method: * If a Drawable object is passed to the method, call the draw method on the object. * If a Movable object is passed to the method, call the move method on the object.
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Computer
We're using programming and OOP tools to build a new computer for work. We won't just have a Computer class. We'll also have a CompItem interface that will be implemented by the Computer class.
16
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
MovieFactory
You have the code for a MovieFactory program. Figure out what it does. Add Cartoon and Thriller classes. Understand how we get a SoapOpera object using the key "soapOpera".
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Janitorial services
Let's create a virtual janitorial business with a cleanAllApartments method for all apartment types and individual methods for cleaning one-, two- and three-bedroom apartments.
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Fixing bugs
Think about how CanSwim and CanWalk interfaces relate to the SeaCreature class. Create the correct inheritance relationship between the interfaces and the SeaCreature class. And how might the Orca, Whale, and RiverOtter classes relate to the SeaCreature class?
16
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Currencies
Let's do some work with money. Your job is to expand the functionality of a program that can manipulate currencies. For the specific currencies, see the task conditions. To start, create a private double field amount in the abstract Money class...
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Fix four mistakes
This code has four bugs, and your task is... Yeah, you already know what your task is. First of all, you need to figure out what the code does. Create something and fix the bugs that were written before you got involved with the code (as well as any that appear after you get involved).
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Exception invasion
In reality, there are oceans of exceptions in programs, and you'll eventually get used to them. You can start right now: populate the list exceptions with ten (10) different exceptions. The first exception is already implemented in the initExceptions method.
16
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
GCD
We continue our attempts to enter the cosmic space belonging to Planet Linear Chaos. Here's another task taken from a border-crossing interview, for young arrivals: find the greatest common divisor (GCD) of two positive integers.
8
టాస్క్
జావా కోర్,  స్థాయిపాఠం
లాక్ చేయబడింది
Singleton
A class implements the Singleton pattern if it lets you create just one object of its type. You need to create a Singleton class in a separate file. Add a static getInstance method that returns the same object any time it is called. Think about how you can prevent the creation of additional instances of this class.
వ్యాఖ్యలు
  • జనాదరణ పొందినది
  • కొత్తది
  • పాతది
వ్యాఖ్యానించడానికి మీరు తప్పనిసరిగా సైన్ ఇన్ చేసి ఉండాలి
ఈ పేజీకి ఇంకా ఎలాంటి వ్యాఖ్యలు లేవు