Dart
xxxxxxxxxx
import 'dart:math';
class Position {
int _x;
int _y;
Position(this._x, this._y);
double get rad => atan2(_y, _x);
void set x(int val) {
_x = val;
}
}
main() {
var p = new Position(2, 3);
p.x = 10;
print('x: ${p._x} y: ${p._y}');
print('rad: ${p.rad}');
}
$ getters_setters.dart x: 10 y: 3 rad: 0.2914567944778671
Linux - anc-api-tools ని ఎలా ఇన్స్టాల్ చేయాలి
Linux - curvedns ని ఎలా ఇన్స్టాల్ చేయాలి
Python - సంఖ్య సానుకూలంగా ఉందా, ప్రతికూలంగా ఉందా లేదా 0 అని తనిఖీ చేయండి
Linux - zenmap ని ఎలా ఇన్స్టాల్ చేయాలి
C - పూర్ణాంకంలో అంకెల సంఖ్యను లెక్కించండి
C++ - లీప్ ఇయర్ని తనిఖీ చేయండి
JavaScript - స్ట్రింగ్ కొన్ని అక్షరాలతో ప్రారంభమై ముగుస్తుందో లేదో తనిఖీ చేయండి
C++ - సంఖ్య ప్రధానమైనదా కాదా అని తనిఖీ చేయండి
Kotlin - ఒక సంఖ్యను n దశాంశ స్థానాలకు రౌండ్ చేయండి
Linux - xbitmaps ని ఎలా ఇన్స్టాల్ చేయాలి
C - డైనమిక్ మెమరీ కేటాయింపును ఉపయోగించి అతిపెద్ద సంఖ్యను కనుగొనండి
Kotlin - ఒక సంఖ్యను రివర్స్ చేయండి
Linux - zstd ని ఎలా ఇన్స్టాల్ చేయాలి
Linux - zfs-test ని ఎలా ఇన్స్టాల్ చేయాలి
Java - ఒక సంఖ్యను రివర్స్ చేయండి
Linux - zookeeper-bin ని ఎలా ఇన్స్టాల్ చేయాలి
Python - Excel (XLSX) ఫైల్లను వ్రాయడం
Java - పిరమిడ్ మరియు నమూనాను సృష్టించండి
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month