Skip to main content

All Questions

Tagged with
0 votes
0 answers
6 views

Can I update value of the private member in another package by using Java encapsulation concept?

Input: Name: PAN: Phone: Account_no=987452 For all users account no should be updated in increasing order. I tried encapsulation concept Getter and setter method And taken all input from the users But ...
Anjali Singh's user avatar
0 votes
1 answer
64 views

LWC setter is not getting called

LWC setter is not getting called. <template> {message}<br><br>1. getter value: {displayMessage}<br><br>2. setter value: {updatedMessage} </template> import { ...
Salesforce developer's user avatar
-1 votes
1 answer
53 views

How to apply python class method decorator GETTER and SETTER?

I'm currently learning about GETTER & SETTER property in Python class method, however I don't really understand how to apply it, Below is my code, could you please let me know: If I have used the ...
insignificant's user avatar
0 votes
1 answer
37 views

What are the differences between these ways of setting a property?

What are the differences between these examples? //example A public class Product { public string Name { get; set; } = "Limited Edition Item" } //example B public class Product { ...
d1du's user avatar
  • 314
0 votes
0 answers
36 views

How can I save the language of the login page and will be displayed in the next page using JavaScript and without localstorge?

How can you save the last language displayed in the login page and going to the next page and garding the same language for exemple i choose French in the login page and the next page must be in ...
Benjazia mohamed oussama's user avatar
0 votes
1 answer
28 views

I can't understand getters, setters

I have a hard time understanding getters, setters. I understand that ‘get’ is for accessing a property and ‘set’ is for changing or mutating that property. But even if I change _numOfSensors to -5 or ...
Kristoffer's user avatar
-1 votes
2 answers
63 views

How do I get this Get and Set Property to work? (the If Statement inside the Set Property is causing an error) [duplicate]

I made a class called Book, and it has a variable called Author. I ask the user to input the name of the author, and if they input something that isn't "Adam" or "Adam Omar", ...
Adam Omar's user avatar
0 votes
1 answer
39 views

Even I set a value with a set method, it returns null from a get method

This is my main code public class PSugangSincheong { public void run(VUserInfo vUserInfo) { Campus campus = new Campus(); College college = new College(); Department ...
hmu's user avatar
  • 3
0 votes
1 answer
71 views

Java dice program incorrect sum of dice

I have this dice program i have been working on. It lets the user roll 2 die, then returns the value of the 2 die, and the sum of the 2 die. the first time I roll a die when running the program, it ...
Pillis's user avatar
  • 1
-2 votes
2 answers
54 views

How can I use the same properties on different classes?

public class Data { public Area Area { get; set; } public Dimensions Dimensions { get; set; } } public class Dimensions { public Length Length { get; set; } public Width Width { get; ...
Nisha's user avatar
  • 1
0 votes
1 answer
716 views

Python | Redis Connects but Stuck on Set or Get

Goal: Successfully set() and get() key-value pairs to local Redis via. Python. I can connect to Redis. A possible issue is a firewall has closed port 6379. However, it is open. Connection works with ...
DanielBell99's user avatar
  • 1,541
-1 votes
2 answers
59 views

How do you get a value of a variable of an other object of the same class?

I'm working on a little game to learn java. Currently I created a Sphere, a Player and a Game class ( + Main class to run). I want the shpere to know, whether it collides with the player or not. First ...
TillRohlFingMann's user avatar
0 votes
1 answer
123 views

How to set up get&set Methods in an ArrayList consisting of custom Objects

I need to create a Java Project, which consists of the following Classes: Main, File, Person, Address. In the Main class, Persons can be created and assigned new Addresses. In the File class the ...
Damir 's user avatar
0 votes
1 answer
103 views

Set object to a variable in another file

I want to call a Entry in my main class from a function in another python file. I discovered, it works with create a list and append it but not with just "=" why is that so? and how does it ...
Patrick T.'s user avatar
0 votes
2 answers
539 views

I need someone to correct my thinking on C# Properties (get & set)

I am having a hard time understanding how properties are "connected" to backing fields. I've set up a common example. I often see get and set simplified to {get; set;}. Is this only ...
Bishibro's user avatar

15 30 50 per page
1
2 3 4 5
27