1. What are differences between the DELETE and TRUNCATE statement? Answer Delete only deletes a row and is slower than truncate. Truncate deletes all the rows and cannot be rolled back. 2. What are the different subsets of SQL? Answer Data Definition Language (Allows you to create and delete objects), Data Manipulation Language (Allows manipulation …
Author Archives: gregreed56
SQL UPDATE Command
In this tutorial we will be using MYSQL Workbench. I will assume you already have MYSQL Workbench set up and are connected to it. The update command is used to modify existing records in a table. You can update two different ways. Either using a WHERE clause or without WHERE clause. Using the WHERE clause …
Interview Questions
What is the JRE? Answer The JRE is the Java Runtime Environment. It’s a container for components that allows you to run java files on a machine. It contains the java class libraries and the java virtual machine. What is the JDK? Answer The JDK is the Java Development Kit. The jdk contains jre as …
Assigning Objects
Is an object a reference? Assigning objects is pretty important in Java. In Java you have two different types of data types. primitive data types (byte, char, short, int, long, float, double, boolean) and you have reference data types. Objects are reference data types. The content of a reference data type is an address to …
Abstract Vs Interface
Abstract and Interfaces are two important uses in Java Classes. Here are a few differences between the two of them. At the bottom I put an example of each one being used. Abstract classes are allowed to have both abstract and non abstract methods. While interface methods are ONLY allowed to have abstract methods. Abstract …
Encapsulation
Originally posted on Space Coding:
//com.collabera.encapsulation; // (Project name here) class EncapsulationDemo{ // encapsulation = binding data with methods /** * The need for encapsulation is to make sure our “private data its safe * Since the only way that we will be able to access our data will be through methods * public =…
Using Class Methods
This is an example of how to use methods in different classes. Java methods are methods in a class used to perform actions. They can either be static or public. Static Methods can be accessed in a class without creating an object. Below is an example on using a Static Method. I created a class …