{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Java Flashcards

(7 cards)

1
Q

Why is the Java platform independent?

A

Java is called so because of its bytecode which can run on any system irrespective of its underlying operation system. The JVM provides a run-time environment in which java byte can be executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What class is the superclass for every other class?

A

Object class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is Java not considered to be 100% object orientated?

A

Because it make use of eight primitive data types (boolean, byte, char, int, float, double, long, short) which are not objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a constructor do in Java?

A

It is a block of code used to initialise an object. The keyword new class the constuctor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a singleton class?

A

Only one instance of a singleton class can be created at any given time. This is achieved by making the constructor private.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a static method?

A

A static method belongs to the class rather than an object class. A static method can be invoked without the need for creating an instance of a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What the four pillars of object orientation

A

Abstraction, Encapsulation, Inheritance, Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly