Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php on line 554

Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php on line 595

Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php on line 535

Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php on line 544

Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-request.php on line 952

Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-request.php on line 972

Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-request.php on line 984

Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-request.php on line 995

Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 151

Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 175

Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 164

Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 186

Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 138

Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 75

Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 89

Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 110

Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 127

Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/smartva9/public_html/smartvania/wp-includes/class-wp-block-list.php on line 199

Deprecated: Optional parameter $criteria declared before required parameter $revision_history is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.media.php on line 293

Deprecated: Optional parameter $post_url declared before required parameter $height is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/class.jetpack-post-images.php on line 781

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 2792

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 2810

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 2841

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 2866

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 2884

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 3026

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 3055

Deprecated: Optional parameter $value declared before required parameter $param is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php on line 3073

Deprecated: Optional parameter $slug declared before required parameter $attr is implicitly treated as a required parameter in /home1/smartva9/public_html/smartvania/wp-content/plugins/jetpack/class.jetpack-gutenberg.php on line 844

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home1/smartva9/public_html/smartvania/wp-includes/class-wp.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home1/smartva9/public_html/smartvania/wp-includes/wp-db.php on line 3031

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637

Warning: Cannot modify header information - headers already sent by (output started at /home1/smartva9/public_html/smartvania/wp-includes/class-wp-theme.php:9) in /home1/smartva9/public_html/smartvania/wp-includes/rest-api/class-wp-rest-server.php on line 1637
{"id":197,"date":"2015-06-05T13:59:24","date_gmt":"2015-06-05T13:59:24","guid":{"rendered":"http:\/\/smartvania.com\/?p=197"},"modified":"2015-06-13T00:00:32","modified_gmt":"2015-06-13T00:00:32","slug":"java-review-first-day-beginner","status":"publish","type":"post","link":"https:\/\/smartvania.com\/java-review-first-day-beginner\/","title":{"rendered":"Java review First day: Beginner"},"content":{"rendered":"

Hi, I will be giving a class on java programming, <\/p>\n

Today in our first lesson we are going to review\/learn some printing statements, for loops and if statements.
\nFirst of all lets start by the software that we will be using for our class.
\nfor IDEA:
\nIntelliJ
\n Download IntelliJ<\/a>
\nThen we will have to download the java SDK:
\n
Download Java SDK<\/a><\/p>\n

To create a new project in IntelliJ, we click on, create new project ( the first time the project needs to be aligned with java sdk).
\nThen we create a package, and afterwards a java class usually with the same name of the package. It will be assigned a default constructor.<\/p>\n

In order for the java program to run, there should be a main static method. <\/p>\n

We will be using the scanner class today, that must be imported with:<\/p>\n

import java.util.Scanner;<\/p>\n

Below there is an example for the lesson of today: <\/p>\n

Printing to the screen:
\n\u00a0<\/p>\n

<\/p>\n
\r\nimport java.util.Scanner;\r\npublic class Hello {\r\n\t\r\n\tpublic static void main(String[] args){\r\n\t\tSystem.out.println(\"hello Yanilda\");\r\n\t\tSystem.out.print(\"Hey Yani\");\r\n\t\tSystem.out.printf(\"Hi Yani\");\r\n\t\tSystem.out.print(\"Hey Yani\");\r\n\t\t\r\n\t\tfor(int i=0; i<10;i++){\r\n\t\t\tSystem.out.println(\"hello Yanilda\");\r\n\t\t}\r\n\t\t\r\n\t\tint aNumber, bNumber;\r\n\t\tSystem.out.println(\"enter input\");\r\n\t\tScanner scaner1 = new Scanner(System.in);\r\n\t\tAnumber=scaner1.nextInt();\r\n\t\tSystem.out.println(\"enter input\");\r\n\t\tBnumber=scaner1.nextInt();\r\n\t\tscaner1.close();\r\n\t\tint abSum=aNumber+bNumber;\r\n\t\tSystem.out.println(\"Sum is \"+abSum);\t\r\n\t\t\r\n\t\tif(abSum<10){\r\n\t\t\tSystem.out.println(\"Less than 10\");\r\n\t\t}\r\n\t\telse if(abSum>10){\r\n\t\t\tSystem.out.println(\"Greater than 10\");\r\n\t\t} \r\n\t\telse{\r\n\t\t\tfor(int i=0;i<5;i++){\r\n\t\t\tSystem.out.println(\" Equal to 10\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}\r\n}<\/pre>\n<\/div>\n

<\/code><\/p>\n

>><\/p>\n

\n

hello Yanilda
\nHey YaniHi YaniHey Yanihello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nhello Yanilda
\nenter input
\n5
\nenter input
\n5
\nSum is 10
\n Equal to 10
\n Equal to 10
\n Equal to 10
\n Equal to 10
\n Equal to 10<\/p>\n<\/div>\n

Comments can be done by using:
\n\/\/ for one line<\/p>\n

***** For beauty
\nIt's always good to have documentation, name of the the program with extension, name of the author, the date and what the program does. under the import statements.<\/p>\n

\n\/**
\n * Hello.java
\n * Purpose: Uses if Statements and for loops, prints and gather input's user.
\n *
\n * @author Yanilda Peralta
\n * @version 1.0 6\/05\/2015
\n *\/<\/p>\n<\/div>\n

Today Practice programs:
\n1- Create a program that asks user for name and then prints out the name + how are you?
\n2- Create Sum the numbers from 1 to 10 using for loops
\n3- Create program that takes an integer input from user and if the integer is positive prints \"positive\"x3, if it's negative it prints\"negative\"x4 and if it's zero, print neutral. Use For loops and if statements.<\/p>\n

Indentation is needed for readability.
\nwhite space between the things that don't belong to a group.
\nName convention.
\nMeaningful names will give you a description of the purpose of the the object\/class\/method\/variable.
\nWhen naming variable in java, the camel style is the way to go, start with lowercase then change to Uppercase if it's a combination of words, e.g. myNumber. don't use under bars, but if wanting to use under bars, put all letters in capital, MY_NUMBER.
\nFor Class names use Uppercase, MyClass.
\nFor methods start with lowercase. myMethod. <\/p>\n

For Homework submission email to:
\njava_homework@smartvania.com<\/p>\n

Homework # 1 -
\nCreate 3 different programs:
\n1- Ask the user for 3 inputs. Then you will decide which input is larger than the other.Then you print out the largest.
\n2-Reverse string in 2 different ways.
\n3-Do the Palindrome in 2 different ways.<\/p>\n","protected":false},"excerpt":{"rendered":"

Hi, I will be giving a class on java programming, Today in our first lesson we are going to review\/learn some printing statements, for loops and if statements. First of all lets start by the software that we will be using for our class. for IDEA: IntelliJ Download IntelliJ Then we will have to download […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,7],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":26,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/posts\/197\/revisions\/233"}],"wp:attachment":[{"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartvania.com\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}