Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Kevin H.
Systems/Software Engineer
Tutor Satisfaction Guarantee
Java Programming
TutorMe
Question:

How does Java "compilation" work from the moment you give the "javac" command?

Kevin H.
Answer:

Java uses a "Just-in-Time" (JIT) compiler. This technique saves time by compiling related portions at the same time. When you enter "javac" with the filename as an argument and press [Enter], Java translates the Java code to "bytecode". This is a very shortened and condensed version of the original program. It takes out everything unnecessary and may even remove variables and optimize everything it can automatically. If you look at the output ".class" file, you will notice it's mostly gibberish. That's OK! We don't need to be able to read it; only your computer does! When a computer goes running a compiled Java program, it has the bytecode translated to machine code for that computer's specific hardware, and the program is then run.

Databases
TutorMe
Question:

Using Standard SQL, please give a list of commands you would use to output the command used to create a table. In this particular instance, we are using the DBMS MySQL. We have a user "usr" and a root password "r00t". The database we're looking at is called mydata and the table is mytable. We need to get the code to recreate an empty version of mytable.

Kevin H.
Answer:

This is a more practical problem involving SQL. In order to do this problem, we will need to know how to do the following (if you do not, please feel free to find them in the SQL Manual or simply Googling it!): 1. Log into SQL 2. Navigate to a database within a commandline 3. Navigate to a table within a commandline 4. The proper command to output this code This is actually a fairly common problem for people writing web apps, so it will definitely behoove you to know how to do this! First, we use the command: > MySQL -u usr -p Then, we will be prompted for the password and enter it in. Next, we use: > USE mydata; Note that the command words themselves are NOT case-sensitive in SQL. Next, we use: > SHOW CREATE TABLE mytable; At this point, the console will output the text (with a few peculiarities) that you can copy and save as a .sql file and later use to recreate an empty version of that table!

Computer Science (General)
TutorMe
Question:

In Java, primitive arrays take in the "index" in order to be able to return a value. For example, let's say we have an array of integers called "myInts". If we wish to place something at key 5, we use the notation myInts[5] = 0; What is the SMALLEST possible size of this array?

Kevin H.
Answer:

In order to answer this question, we must understand the basic anatomy of a Java array. It is a bit of a trick question for newer programmers, because we must understand that the array is zero-indexed. This means that there is indeed something stored in myInts[0]. If we know that the statement myInts[5] = 0 is valid and properly assigns 0 to the 5 key, then we know there must also exist myInts[0], myInts[1], myInts[2], myInts[3], and myInts[5]. Therefore, the smallest possible size of the array "myInts" would be 6.

Send a message explaining your
needs and Kevin will reply soon.
Contact Kevin
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.