UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why do we use static keywords in Java?

Asked by Last Modified  

3 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Tutor

You need to understand the static vs normal ... When you defined a variable static then that variable will be shared across all the objects of the class... but the normal variable is associated with the object and it's different for different objects....Rest u can see here . https://www.javatpoint.co...
read more
You need to understand the static vs normal ... When you defined a variable static then that variable will be shared across all the objects of the class... but the normal variable is associated with the object and it's different for different objects....Rest u can see here . https://www.javatpoint.com/static-keyword-in-java read less
Comments

Software Engineer

Lets take a example you wanted to create a record of 100 student. class student { int roll_no; String name; String college_name; } so while creating 100 object of student class the student's college name will be common but in upper define class the college_name will also will be created...
read more
Lets take a example you wanted to create a record of 100 student. class student { int roll_no; String name; String college_name; } so while creating 100 object of student class the student's college name will be common but in upper define class the college_name will also will be created 100 times which is unnecessary and memory wastage. By declaring the college_name as static (static String college_name) only one copy of college_name will be created because only one copy of each static variable being created at class level. read less
Comments

The static keyword in Java means that the variable or function is shared between all instances of that class as it belongs to the type, not the actual objects themselves
Comments

View 1 more Answers

Related Questions

Is it good to go for a Java coaching center and learn Java (with advanced Java) to improve my programming skills?
yes, Please check the Institute reviews and discuss with the tutor, what topics were covered in class. Ask about the practicals session and how many hours/duration of the course.
Gerda
0 0
5
What is 'this' in Java?
this is a keyword in Java. Works as a reference to current object whose constructor is being invoked
SEED Infotech Ltd
hi this iz sunil here I done with my b.sc in cs and planning to go fr java course shld I prefer for institution or a lecturer who teaches java at his own tuitions ...
You can choose either of the way, but make sure you join with right tution or instructor, make sure he teaches all the topics.
Sunil
0 0
5
Why Java doesnot have Pointer ?
The reasons are Pointers are fundamentally unsafe. Java has a robust security model and disallows pointer arithmetic.Java ensures pointer access via indexed array. A big advantage of Java's indexed array...
Satyajit

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Amazon written test for experience
For the below written test answer I defined with "*" at the end of the options NULL is the same as 0 for integer the same as blank for character * the same as 0 for integer and blank for character the...

Implementation: What Is JPA And JPA?
The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. JPA allows us to work with Java classes...

2.1. Reverse a singly linked list.
class Node { int data; Node next; Node(int data) { this.data = data; this.next = null; }} public class LinkedList { Node head; public void reverse() { Node prev = null; Node curr = head; Node next =...

Constructor in Java
A constructor is a particular type of method that is used to initialise the object. The constructor is invoked at the time of object creation. It constructs the values, i.e. provides data for the object...

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Recommended Articles

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more