Share on Google+Share on Google+

Anuj Kumar
what is the size of java class
0 Answer(s)      6 years and 3 months ago
Posted in : Java Beginners

Could anyone tell me how to find the size of the class given below.

public class Sample {

private int x;
private int y;
private char ch;

public static void main(String[] args) {
    Sample sample = new Sample();
    sample.x = 1;
    sample.y = 2;
    sample.ch = 'a';

}

public void display() {
    System.out.println("Hi everyone");
}

}

please answer asap.

(Knapster)

Ads

View Answers









Related Tutorials/Questions & Answers:
what is the size of java class
what is the size of java class  Could anyone tell me how to find the size of the class given below. public class Sample { private int x; private int y; private char ch; public static void main(String[] args) { Sample
Java Class Size
Java Class Size  How to determine size of java class
Advertisements
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
In Java how to get size of class and object?
In Java how to get size of class and object?  In Java how to get size of class and object
Difference in size of .java & its respective .class file
Difference in size of .java & its respective .class file  Hai, I had created & compiled a java class named sample.java. The size of sample.java is 340KB. Whereas the size of its respective class file sample.class is 137KB
what is the default buffer size for bufferedreader
what is the default buffer size for bufferedreader  Hi, I am writing a program in Java for reading the big text file. I want to know what is the default buffer size for bufferedreader? Is there any example of reading the big
What is inner class in Java? - Java Beginners
What is inner class in Java?  Hi, Explain me inner classes in Java. What is the use of inner classes? Give examples of inner classes in Java...://www.roseindia.net/java/master-java/inner.shtml Uses: Non-static inner class
What?s the maximum size of a row in SQL table?
What?s the maximum size of a row in SQL table?  What?s the maximum size of a row in SQL table?   Hi, The maximum Row Size is 8060 Bytes in a sql table. Thanks
please tell me what is ment by wrapper class in java........
please tell me what is ment by wrapper class in java........  what is ment by wrapper class in java
maximum size of arraylist - java
maximum size of arraylist - java  1.what is the maximum size...? 4.how many access specifier and how many access modifier in java? 5.what is difference b/w abstract class and interface? 6.which is best b/w abstract class
What is an Abstract Class and what is it's purpose?
What is an Abstract Class and what is it's purpose?   Hi, What is an Abstract Class and what is it's purpose? Thanks
How to find hashtable size in Java?
How to find hashtable size in Java?  Hi, What is the code for Hashtable in Java? How to find hashtable size in Java? Give me the easy code. Thanks
ARRAY SIZE!!! - Java Beginners
ARRAY SIZE!!!  Hi, My Question is to: "Read integers from... don't know it's size (and I don't want to ask the user to enter it's size... to initialize the array when you don't know the size of the array. Just to get
ARRAY SIZE. - Java Beginners
ARRAY SIZE.  Thanks, well that i know that we can use ArrayList... java.util.ArrayList; public class CopynDouble1 { public static void main(String... class CopynDouble1 { public static void main(String[] param){ try
What is an abstract class?
What is an abstract class?  What is an abstract class
What is Action Class?
What is Action Class?  What is Action Class? Explain with Example
Example of Hashset size() method in java.
Example of Hashset size() method in java. The size() is a method of HashSet class. It is used to calculte the size of HashSet. The size of method... class SizeOfHashSet { public static void main(String[] arg) { HashSet
What is the Locale class?
is called locale-sensitive. For details visit What is Locale class in Java...What is the Locale class?  What do you understand about locale class in java program. thanks,   Hi, The Locale class in Java is Java
If elements are added at same bucket location in HashMap then what will be the size of HashMap?
"); System.out.println(map + " Size:::: "+map.size()); } } class Employee { private... then what will be the size of map...If elements are added at same bucket location in HashMap then what
What is final class?
What is final class?  Hi, What is final class? thanks   Hi, A final class is not be saubclassed. A final method can't be overridden when its class is inherited. You can't change value of a final variable
arraylist size in the Java program
size() function gives  the total number of elements present in the arrayList. Example of Java Arraylist Size() Function import java.util.ArrayList; import java.util.List; public class List1
What is the base class of all classes?
What is the base class of all classes?  Hi, What is the base class of all classes? thanks   Hi, The base class is nothing but the Abstract class of Java programming. We uses the syntax for base class of all
What is a local, member and a class variable?
What is a local, member and a class variable?   Hi, What is a local, member and a class variable? thanks
what's the purpose of constructor in abstract class?
what's the purpose of constructor in abstract class?  what's the purpose of constructor in abstract class
what is class methods in objective c
what is class methods in objective c  What is class methods in objective c? Explain the class method of objective c with the help of an example
what is class methods in objective c
what is class methods in objective c  What is class methods in objective c? Explain the class method of objective c with the help of an example
Controlling Java Heap Size Memory Allocation
Controlling Java Heap Size Memory Allocation  Hi, Tell me about Controlling Java Heap Size Memory Allocation? I have to run java program from console and allocate 2GB of RAM to Java Heap Size. Thanks   Hi, You can
Java class
Java class  What is the purpose of the Runtime class
How to decrease image thumbnail size in java?
How to decrease image thumbnail size in java?  Hi, I my web application I have to create the thumbnail size image from the image file uploaded by user. How to decrease image thumbnail size in java? Thanks
size of the image - Java Server Faces Questions
size of the image  Hello, how to set the size of the image while...*;import com.lowagie.text.pdf.*;import com.lowagie.text.*;public class.../java
If I open .class file with notepad what is displayed?
If I open .class file with notepad what is displayed?   What is displayed when we open java .class files with notepad
Tutorials   
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code

Ads

 
Advertisement null

Ads