Skip to content

junaiddodhia/array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArrayList implementation in Java (without using the Java Collections framework)


Empty stub

/** Represents an empty stub for the class MyArray.
 * 
 * 
 * @author Junaid Dodhia
 */
public class MyArray {
}

Variables

/**
 * Internal array of Type String.
 */
 private String[] internalArray;

/**
 * Size of the underlying array (number of elements).
 */
 private int arraySize;

Functions

public MyArray()
public MyArray(int initialCapacity)
public void add(String text)
public boolean search(String key)
public int size()
public int getCapacity()
public void display()
public void removeDups()

Default constructor

/**
 * Default constructor.
 */
public MyArray() {
	 arraySize = 0;
	 internalArray = new String[10];
}

Parameterized constructor

/**
 * Parameterized constructor.
 *
 * @param initialCapacity the initial capacity of internalArray
 */
public MyArray(int initialCapacity) {
	arraySize = 0;
				// internal array initialized with the capacity passed in
	  if (initialCapacity >= 0) {
	    internalArray = new String[initialCapacity];
	  } else {
        // internal array initialized with default capacity as 10
        internalArray = new String[10];
      }
}

A function to add a word to the array after performing the required checks

/**
 * Adds the word to the array after performing required checks.
 *
 * Worst-case running time complexity: Amortized O(1)
 *
 * @param text string to add to internalArray
 */
public void add(String text) {

    // check if text is not null and is a sequence of letters
		if (text != null && text.matches("[A-Za-z]+")) {

            // check if the array is empty
            if (size() == 0) {
                internalArray = new String[1];
            }

            // double the capacity of the array if size is equal to the capacity
            if (size() == getCapacity()) {
                String[] temp = new String[2 * getCapacity()];
                System.arraycopy(internalArray, 0, temp, 0, size());
                internalArray = temp;
            }

            // add the text to the internal array
            internalArray[arraySize++] = text;
		}
}

A function to search for a given word in the array and return true if found or false if not

/**
 * Searches for a given word in the array and returns true if found or false if not.
 *
 * Worst-case running time complexity: O(n)
 *
 * @param key the word to be searched in the array
 * @return a boolean value to indicate if the word was found
 */
public boolean search(String key) {
        try {
            for (int i = 0; i < getCapacity(); i++) {
                // check if the word is equal to the search string
                if (internalArray[i].equals(key)) {
                    // word found
                    return internalArray[i].equals(key);
                }
            }
        } catch (NullPointerException e) {
            // word not found
            return false;
        }
        return false;
}

A function to return the size of the array

/**
 * Returns the size of the array.
 *
 * Worst-case running time complexity: O(1)
 *
 * @return size of internalArray
 */
public int size() {
	return arraySize;
}

A function to return the capacity of the array

/**
 * Returns the capacity of the array.
 *
 * Worst-case running time complexity: O(1)
 *
 * @return capacity of internalArray
 */
 public int getCapacity() {
	 return internalArray.length;
 }

A function to display the content of the array

/**
 * Prints all the words in one line and puts a space between words.
 *
 * Worst-case running time complexity: O(n)
 */
 public void display() {
	StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < getCapacity(); i++) {
            if (internalArray[i] != null) {
                stringBuilder.append(internalArray[i]).append(" ");
            }
        }
        // trims out the last space appended
        String displayText = stringBuilder.toString().trim();
        System.out.println(displayText);
        stringBuilder.trimToSize();
}

A function to remove duplicates from the array

/**
 * Removes duplicate words from the array.
 *
 * Worst-case running time complexity: O(n^2)
 */
 public void removeDups() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(" " + internalArray[0] + " ");
        int duplicateCount = 0;
        int i = 1;
        while (i < getCapacity()) {
            if (internalArray[i] != null) {
                // check for duplicates
                if (stringBuilder.toString().contains(" " + internalArray[i] + " ")) {
                    duplicateCount++;
                    // delete the duplicate
                    System.arraycopy(internalArray, 0, internalArray, 0, i);
                    System.arraycopy(internalArray, i + 1, internalArray, i, getCapacity() - i - 1);
                } else {
                    stringBuilder.append(" " + internalArray[i] + " ");
                    i++;
                }
            } else {
                i++;
            }
        }
        arraySize = size() - duplicateCount;
        stringBuilder.trimToSize();
}

Expected output:

david is found
Number of words in the file is : 9398
Capacity of words array is: 16384
the children s bible selections from the old and new testaments translated and arranged by henry a sherman head of the department of religious literature of charles scribner s sons and charles foster kent woolsey professor of biblical literature in yale university illustration curtis publishing company suffer the little children to come unto me and forbid them not for of such is the kingdom of god new york charles scribner s sons mcmxxxvi copyright by charles scribner s sons all rights reserved including that of translation into foreign languages including scandinavian printed in the united states of america preface the children s bible provides in simple english a translation of selections from both the old and the new testament these selections have been made as a result of more than twenty five years of observation and study the text is that of the bible itself but in the language of the child so that it may easily be read to the younger children and by those who are older it is not in words of one syllable for while the child is reading the bible he should gradually learn the meaning of new words and idioms the bible contains the foundations on which the religious life of the child must be built the immortal stories and songs of the old and new testaments are his richest inheritance from the past to give him this heritage in language and form that he can understand and enjoy is the duty and privilege of his parents and teachers it is hoped that the children s bible will meet the need and the demand which parents and educators alike have long felt and often expressed for a simple translation of selections from the bible most suited to the needs and the interests of the child it is also believed that after the child has learned to appreciate and love these stories and songs he will be eager and able to read the bible as a whole with genuine interest and understanding contents the old testament page the story of creation god s good gifts to man the first disobedience cain and his brother abel noah and the great flood the story of the tower of babel abraham the friend of god and man lot s escape from a wicked city god s care for the boy ishmael abraham s loyalty to god how rebekah became the wife of isaac how jacob deceived his father jacob s dream the deceiver deceived meeting a brother who had been wronged joseph sold as a slave by his brothers joseph s eagerness to help others a prisoner who became a mighty ruler the testing of joseph s brothers joseph s forgiveness of his brothers joseph s loyalty to his family the boyhood and training of moses the voice from the bush pharaoh the stubborn ruler the cost of being cruel and stubborn the escape from egypt god s commands to the people our duties to god and man the report of the hebrew spies the last words of moses crossing the river jordan the capture of jericho and ai women who saved a nation gideon s brave band jephthah s foolish promise samson who did to others as they did to him a strong man who lost his strength the devotion of ruth samuel the boy prophet the ark among the philistines how samuel found a leader jonathan s brave deed david s victory over the giant saul s mean jealousy jonathan s love for david the cost of a lie a soldier who spared his enemy abigail s sensible advice making the best of trouble the death of two brave warriors a shepherd boy who was called to lead a nation jerusalem made the capital city david s kindness to jonathan s son a rich man who was a thief absalom the ungrateful son a broken hearted father how solomon became the ruler of israel a young man s wise choice building a great temple a ruler who wronged his people rehoboam s great mistake elijah and the widow s son the prophet of fire god s low whisper ahab the thief micaiah s courage in telling the truth the mantle of elijah elisha healing the sick boy a slave girl who helped her master elisha s way of treating enemies the end of ahab s selfish family the boy joash on the throne of judah a young man who said send me jeremiah s call to do a hard task the young josiah and the book of the law the writing of an ancient book a prophet who saved a great city jeremiah s courage in danger the sad fate of a guilty nation the courage of four captives a king s strange dream the test by fire the handwriting on the wall daniel in the lions den queen esther s love for her people rebuilding the temple nehemiah s answer to a call for help overcoming great difficulties a brave knight jonah the narrow minded patriot the story of job the king of glory god the loving creator god the loving father god from whom all good things come god s goodness and mercy god the all seeing god who always watches over his people god who protects from all danger god s protection of those who trust in him god s loving care trusting in god s care a prayer of trust safety in god s care god our refuge the joy of worshipping god what god asks of those who worship him a call to praise god the united song of praise man s place in god s world the reward of doing right a prayer for forgiveness the rewards of listening to the advice of the wise what god likes and dislikes god s care for those who try to do right the way to be well and happy the importance of being willing to learn how to honor your parents the troubles of those who are lazy things that are better than riches right eating and drinking the right use of the tongue the control of the temper what it means to be modest being generous and loving the new testament jesus is born at bethlehem the wise men bring gifts to the young child the boy jesus asks questions john the baptist tells of jesus work jesus decides how he will do his work jesus wins devoted friends the wedding at cana the healing of the ten lepers healing the man at the pool jesus talks with a samaritan woman giving life to a widow s son jesus heals the sick jesus cures a man who cannot walk jesus makes even wrong doers his friends jesus finds joy in all his work jesus calms the storm jesus heals a little girl jesus visits his old home jesus calls together his friends and helpers what jesus asks of his friends and helpers the way to learn from jesus the rewards for following jesus teachings god s love even for sinners god s readiness to answer prayer how to pray why we should trust god the kingdom of god the two great commandments the rewards of modesty and unselfishness how to use money different ways of using talents the good samaritan the way to treat those who wrong us the golden rule the people who are really happy jesus sends out the first missionaries jesus praises john the baptist jesus feeds the hungry jesus tells what it means to be clean jesus is kind to a stranger jesus makes an heroic choice jesus is glorified jesus tells how one may become great jesus makes the wicked zaccheus his friend jesus is gladly welcomed by the people jesus fights wrong in the temple jesus condemns those who pretend to be good jesus warns his disciples jesus cures a blind man jesus tells what he came to do jesus brings lazarus back to life jesus praises a woman who gave her best jesus eats the last supper with his disciples jesus encourages his friends and helpers jesus is seized by the mob jesus in the hands of his enemies jesus is crucified by his enemies jesus conquers death jesus walks and talks with two of his disciples jesus gives his last command to his helpers the wonders of the day of pentecost the healing of the lame man at the beautiful gate the generosity of the early christians stephen the first christian martyr philip and the ethiopian peter and the roman officer peter s escape from prison paul s account of what he saw and heard on his way to damascus the christian church at antioch paul and barnabas in foreign lands why paul went to macedonia paul and silas in macedonia paul s great speech at athens paul writes to his friends at thessalonica paul s work at corinth paul writes to his friends in corinth the new life after death ways of showing love paul s trials and victories at ephesus paul writes to the christians at rome paul s last journey to jerusalem paul s narrow escape from death a prisoner who preached to his judges paul s shipwreck the end of paul s long journey paul s last words to his friends the meaning of faith the importance of doing what is right the love that makes men brothers the glory and honor that jesus has won the reward of the faithful the new heaven on earth illustrations in color the lord is my shepherd painted by w l taylor suffer the little children to come unto me painted by w l taylor facing page hagar and ishmael in the wilderness painted by w l taylor rebekah comes to isaac painted by w l taylor saul and david painted by w l taylor the parting of elijah and elisha painted by w l taylor the prophet isaiah painted by w l taylor lo children are a heritage of the lord painted by w l taylor i will lift up mine eyes unto the hills painted by w l taylor the nativity painted by w l taylor the three wise men painted by w l taylor o little town of bethlehem painted by w l taylor seeking the lost sheep painted by herbert moore the prodigal son painted by herbert moore the good samaritan painted by herbert moore among the lowly painted by l l hermitte in duotone facing page building the tower of babel painted by j james tissot the testing of abraham painted by fritz von uhde joseph converses with judah his brother painted by j james tissot the finding of moses painted by juliaan de vriendt ruth painted by henry ryland daniel s answer to the king painted by briton riviere esther denouncing haman painted by ernest normand christ and the fishermen painted by e zimmerman raising the daughter of jairus painted by l on g r me christ with mary and martha painted by h siemiradzki the sower painted by herbert moore christ on the hilltop painted by c a slade christ in the temple painted by c a slade the last supper the walk to emmaus painted by eug ne girardet st paul preaching at athens painted by raphael the old testament the children s bible the story of creation in the beginning god made the heavens and the earth and while the earth was still unformed god said let there be light and there was light and god saw that the light was good then god separated the light from the darkness and god called the light day and the darkness night and there was an evening and a morning making the first day and god said let there be a sky and let it divide the waters that are below from the waters that are above the sky and it was done and god called the sky the heavens and there was an evening and a morning making the second day and god said let the waters under the heavens be brought together and let the dry land appear and it was done and god called the dry land earth and the waters that were brought together seas and god saw that it was good and god said let plants and trees grow from the earth and it was done and plants and trees grew from the earth each plant bringing forth its own kind of seed and each tree its own kind of fruit and god saw that it was good and there was an evening and a morning making the third day and god said let there be lights in the heavens to separate the night from the day let them be signs to mark the seasons the days and the years let them be lights in the heavens to light the earth and it was done so god made the two great lights the sun and the moon the greater to rule the day and the lesser to rule the night god made the stars also and placed them in the heavens to throw light upon the earth and god saw that it was good and there was an evening and a morning making the fourth day and god said let the waters bring forth many living creatures and let birds fly above the earth and in the sky and god made large sea monsters and all kinds of living creatures with which the waters abound and all kinds of birds and god saw that it was good and he blessed them saying increase and fill the waters in the seas and let the birds increase on the earth and there was an evening and a morning making the fifth day and god said let the earth bring forth all kinds of living creatures cattle and creeping things and wild beasts and it was done so god made all the different kinds of wild beasts and the cattle and everything that crawls upon the ground and god saw that it was good and god said let us make man like ourselves let him rule over the fish in the sea the birds of the sky the cattle the wild beasts and all the living things that crawl upon the ground and god made man like himself like god he made him he made them male and female and god blessed them and said to them have children increase live all over the earth and conquer it rule over the fish of the sea the birds of the sky and over every living thing that crawls upon the ground and god said see to you i give every plant which grows on all the earth and every tree which bears fruit with its own kind of seed it shall be food for you and to every wild beast and to every bird of the sky and to every thing that crawls on the earth and is alive i give every green herb for food and it was done and when god saw everything that he had made he saw that it was very good and there was an evening and a morning making the sixth day and the heavens and the earth were finished and all that there was in them and on the seventh day when god had finished the work which he had done he rested from all his work and god blessed the seventh day and made it holy for in it he rested from all the work which he had done god s good gifts to man at the time when jehovah made earth and heaven no trees or plants grew on the earth for jehovah had not yet sent the rain and there was no man to till the soil but a mist rose from the earth and watered the ground then jehovah made man out of dust taken from the ground and breathed into him the breath of life and man became a living being and jehovah planted a garden in eden far in the east and out of the ground he made grow all kinds of trees that are pleasant to look at and good for food also the tree of life and the tree that gives the knowledge of good and evil then jehovah took the man and put him in the garden of eden to till it and to care for it and jehovah gave the man this command you may eat all you wish from every tree of the garden except from the tree that gives the knowledge of good and evil from this you shall not eat for if you eat from it you shall surely die then jehovah said it is not good for the man to be alone i will make a companion for him so out of the ground jehovah made all the wild beasts and birds and brought them to the man to see what he would name them and whatever he called each living thing that became its name but for the man himself there was found no companion suited to him then jehovah made the man fall into a deep sleep and while he slept he took one of his ribs and closed up its place with flesh the rib which he had taken from the man jehovah made into a woman and brought her to the man then the man said because she was made from my body she shall be called woman the first disobedience now the serpent was more deceitful than any other animal that jehovah had made and it said to the woman has god really said you shall not eat from any tree of the garden the woman answered we may eat of the fruit of all the trees of the garden except the fruit of the tree which is in the middle of the garden for god has said you shall not eat from it nor shall you touch it for if you do you shall die then the serpent said to the woman you shall not surely die for god knows that as soon as you eat of it your eyes will be opened and you will know what is good and what is evil when the woman saw that the tree was good for food beautiful to look at and that it would make her wise she took some of its fruit and ate it then she gave some to her husband who was with her and he ate then the eyes of both of them were opened so that they knew that they were naked and they sewed fig leaves together and made girdles for themselves when they heard the sound of the footsteps of jehovah as he was walking in the garden in the cool of the day the man and his wife hid from him among the trees of the garden and jehovah called to the man and said to him where are you and he answered i heard the sound of thy footsteps in the garden and i was afraid because i was naked so i hid myself jehovah said who told you that you were naked have you eaten from the tree from which i forbade you to eat the man answered the woman whom thou didst give to me she gave me fruit from the tree and i ate jehovah said to the woman what is this that you have done the woman replied the serpent deceived me and i ate then jehovah said to the serpent because you have done this you shall be hated more than all beasts you shall crawl on your belly and eat dust all your life and men and serpents shall always be enemies they shall bruise your head and you shall wound them on the heel to the woman he said i will greatly increase your trouble and your pain and you shall be subject to your husband and he shall rule over you but to the man he said because you have listened to your wife and have eaten of the tree from which i forbade you to eat as long as you live you shall earn a living only by hard work by hard work shall you raise food to eat and you shall die and your body go back to the ground for from dust you were made and to dust you shall return and jehovah made garments of skins for the man and his wife and clothed them and he sent them out of the garden of eden to till the ground cain and his brother abel adam named his wife eve because she was the mother of all living beings she had two sons cain and abel abel was a shepherd but cain was a farmer one day cain brought as an offering to jehovah some fruit and grain that he had grown abel too brought some of the best animals of his flock and sacrificed their fat pieces to jehovah jehovah was pleased with abel and his offering but cain and his offering did not please him this made cain very angry and his face showed it so jehovah said to cain why are you angry and why do you scowl if you do what is right and good will not your offering be accepted but if you do wrong sin crouches like a wild beast at the door and the desire to sin will overcome you but you should master it cain said to his brother abel let us go into the field and while they were in the field cain struck his brother abel and killed him when jehovah said to cain where is your brother abel cain answered i do not know am i my brother s keeper jehovah said what have you done hark your brother s blood is crying to me from the ground even now you are condemned by the very ground that has opened to receive your brother s blood from your hand whenever you till the ground it shall no longer yield to you its strength you shall be a tramp and a wanderer on the earth then cain said to jehovah my punishment is more than i can bear see thou hast driven me out to day from this land and i shall no longer be able to worship thee i shall become a tramp and a wanderer on the earth and whoever finds me will kill me but jehovah said to him if any one kills you he shall be punished sevenfold so jehovah placed a mark on cain to keep any one who found him from killing him and cain went out from jehovah s presence and lived as a wanderer away from eden noah and the great flood when jehovah saw that men were growing more wicked in the world and that their thoughts were always evil he was greatly grieved and regretted that he had made man therefore jehovah said i will completely destroy all living beings from off the earth for i regret that i have made them but noah had won jehovah s favor so jehovah said to noah i have decided to put an end to all living beings for the earth is filled with their wicked acts i am going to destroy them from the earth make yourself an ark of cypress wood build rooms in the ark and cover it within and without with pitch this is how you shall build it the ark shall be five hundred feet long eighty feet wide and fifty feet high make a roof for it and place the door on the side build it with lower second and third stories for i am about to bring floods of water upon the earth to destroy every living creature in which is the breath of life every creature that is on the earth shall die then jehovah said to noah enter with all your household into the ark for i see that of all the people who are now alive you alone are upright of all the beasts that are fit for food and sacrifice you shall take with you seven the male and the female but of the beasts that are not fit for food and sacrifice two the male and the female and of the wild birds that are fit for food and sacrifice seven to keep each kind alive on all the earth after seven days i will send rain on the earth for forty days and forty nights and i will destroy every living thing that i have made then noah did all that jehovah commanded him when the waters of the flood came upon the earth he his sons his wife and his sons wives together with the beasts that were fit for food and sacrifice and the beasts that were not fit and the birds and everything that creeps upon the ground entered the ark because of the waters of the flood the rain fell upon the earth forty days and forty nights and jehovah shut noah in the ark and the waters rose higher and higher and raised up the ark and it was lifted high above the earth all creatures living on the land died noah only was left and they who were with him in the ark then god remembered noah and all the beasts and all the animals that were with him in the ark and god caused a wind to blow over the earth and the flood went down the rain from heaven ceased and the waters withdrew more and more from the land after forty days noah opened the window of the ark and sent out a raven and it kept going to and fro until the waters were dried up on the earth he also sent out a dove to see if the waters had gone from the surface of the earth but the dove found no rest for her foot and so returned to him to the ark for the waters covered the whole earth therefore noah reached out his hand and took her and brought her back into the ark then he waited seven days longer and again sent out the dove from the ark and the dove came in to him at dusk and in her mouth was a freshly plucked olive leaf so noah knew that the waters had gone from the earth and he waited seven days more and again sent out the dove but it did not return to him so noah took off the covering of the ark and looked and saw that the surface of the ground was dry then he with his sons his wife and his sons wives went out of the ark and noah built an altar to jehovah and took one of every beast and bird that was fit for sacrifice and offered burnt offerings on the altar and jehovah said to himself i will never again condemn the ground because of man nor will i again destroy every living creature as i have done while the earth remains seedtime and harvest cold and heat summer and winter day and night shall not cease and god said this is the sign of the solemn agreement that i make for all time between me and you and every living creature that is with you i have placed my rainbow in the cloud and it shall be the sign of the solemn agreement between me and the people who live on the earth whenever i bring a cloud over the earth and the rainbow is seen in the cloud i will remember the agreement which is between me and you and every living creature and the waters shall never again become a flood to destroy them the story of the tower of babel all the people of the earth spoke one language and as they travelled westward they found a broad valley in the land of babylonia and made their home there then they said one to another come let us make bricks and thoroughly bake them so they had bricks for stone and asphalt for mortar and they said come let us build us a city and a tower whose top will touch the heavens and thus make a landmark that we may not be scattered over all the earth but when jehovah came down to see the city and the tower men had built he said see they are one people and all have one language this is but the beginning and now nothing which they plan to do will seem too difficult for them come let us go down and confuse their language that they may not understand one another so jehovah scattered them from there over all the earth and they stopped building the city therefore they named it babel which means confusion for there jehovah confused the language of all the people on the earth and scattered them over the whole world abraham the friend of god and man the sons of noah who came out of the ark were shem ham and japheth terah a descendant of shem was the father of abraham nahor and haran and haran was the father of lot jehovah said to abraham go from your country your relatives and your father s house to the land that i will show you and i will make of you a great nation and i will surely bless you and make your name famous so that you shall be a blessing and all the families of the earth shall ask for themselves a blessing like your own so abraham set out as jehovah had commanded him and lot went with him abraham was seventy five years old when he left haran he took sarah his wife and lot his brother s son and everything that they had and started for the land of canaan abraham passed through the land to a place called shechem to the oak of moreh there jehovah appeared to abraham and said to your children will i give this land there abraham built an altar to jehovah who had appeared to him from there he removed to the hill near bethel and pitched his tent with bethel on one side and ai on the other and there too he built an altar to jehovah and prayed to him now abraham was very rich in cattle in silver and in gold lot also who went with abraham had so many flocks and herds and tents that the land was not rich enough to support them both so when there was a quarrel between lot s herdsmen and abraham s herdsmen abraham said to lot i beg of you let there be no quarrel between me and you nor between my herdsmen and yours for we are relatives is not the whole land before you i beg of you separate yourself from me if you go to the left then i will go to the right or if you go to the right then i will go to the left illustration the tower of painted by j james tissot so lot looked about and saw that all the plain of the jordan as far as zoar was well watered everywhere like a garden of jehovah so lot chose for himself all the valley of the jordan and lived in the cities of the plain and moved his tent as far as sodom but the men of sodom were very wicked and sinned against jehovah jehovah said to abraham after lot had gone away from him lift up your eyes and look from the place where you are northward southward eastward and westward for all the land that you see i will give to you and to your children forever i will make them as many as the dust of the earth so that if a man can count the dust of the earth then your children may also be counted rise walk through the length and breadth of the land for i will give it to you then abraham moved his tent and lived in the oak grove of mamre which is in hebron and built there an altar to jehovah jehovah also appeared to abraham by the oaks of mamre as he was sitting at the entrance of his tent in the heat of the day and as he looked up three men stood there before him as soon as he saw them he ran from the entrance of his tent to meet them and bowed to the ground and said sirs if you are willing to do me a favor do not i beg of you pass by your servant since you have come to your servant let a little water be brought that you may wash your feet and lie down under the tree and let me bring some food that you may refresh yourselves afterward you may go on your way they replied do as you have said so abraham hastened to sarah s tent and said make ready quickly four measures of fine meal knead it and make cakes abraham also ran to the herd and took a calf that was tender and good and gave it to the servant and he prepared it quickly then abraham took curd and milk with the calf which he had prepared and served them and he waited on them under the tree while they ate then they said to him where is your wife he said there within the tent one of them said i will surely return to you about nine months from now and then sarah your wife shall have a son lot s escape from a wicked city and abraham went along with them to start them on their way jehovah said the complaint has come that the people of sodom and gomorrah have committed great and terrible sins i will go down and see whether they have done exactly as the complaint comes to me and if they have not i will know then the men turned from there and looked off in the direction of sodom then abraham drew near to jehovah and said wilt thou sweep away the righteous with the wicked suppose there are within the city fifty people who are righteous wilt thou sweep away and not spare the place for the fifty righteous who are in it far be it from thee to do this to slay the righteous with the wicked and that the righteous should be treated as the wicked far be it from thee shall not the judge of all the earth do what is just jehovah said if i find in the city of sodom fifty who are righteous i will spare the whole place for their sake abraham answered i have dared to speak to jehovah even though i am but dust and ashes suppose there be five lacking of the fifty righteous wilt thou sweep away all the city for lack of five jehovah said i will not sweep it away if i find forty five there then abraham spoke to him again and said suppose forty are found there he replied for the sake of forty i will not do it then abraham said oh let not jehovah be angry but let me speak suppose thirty are found there he answered i will not do it if i find thirty there then abraham said thou seest that i have dared to speak to jehovah suppose twenty are found there he replied for the sake of twenty i will not destroy it then abraham said oh let not jehovah be angry but let me speak just once more suppose ten are found there and he said for the sake of the ten i will not destroy it then jehovah went his way and abraham returned home two angels in human form came to sodom in the evening as lot was sitting at the gate of sodom when lot saw them he rose up to meet them and he bowed with his face to the earth and said sirs turn aside i beg of you into your servant s house and spend the night and wash your feet then you can rise up early and go on your way they said no we will spend the night in the street but he urged them so strongly that they went with him and entered his house and he made a feast for them and baked bread made without yeast and they ate but before they had lain down the people of sodom both young and old all the people from every quarter surrounded the house and they called out to lot where are the men who came in to you to night bring them out to us that we may do to them what we desire then lot went out to them at the entrance of his house but he shut the door after him and he said i beg of you my friends do not do what is wrong do nothing to these men for they have come under the shadow of my roof but they replied stand back or we will treat you worse than them and they pressed hard against lot and advanced to break the door but the men reached out and drew lot to them into the house and shut the door then they smote the men who were at the door of the house both small and great with blindness so that they grew tired of searching for the door then the men said to lot have you any one else here bring your sons in law your sons and daughters and whoever you have in the city out of this place for we are about to destroy it because great complaint concerning the people has come to jehovah and he has sent us to destroy it so lot went out and said to his sons in law up go out of this place for jehovah will destroy the city but his sons in law thought he was only jesting when the dawn appeared the angels urged lot saying get up take your wife and your two daughters that you may not be swept away in the punishment of the city when he hesitated the men took him by the hand and led him and his wife and his two daughters outside the city for jehovah was merciful to him when they had brought them outside they said run for your life do not look behind you nor stay anywhere in the plain escape to the heights that you may not be swept away but lot said to them oh sirs not so see your servant has found favor with you and you have shown great mercy to me in saving my life i cannot escape to the heights lest some evil overtake me and i die see now this village is near enough to run to and it is small oh let me escape there and my life will be saved jehovah said to him i have also granted you this favor in that i will not destroy the village of which you have spoken make haste escape to it for i can do nothing until you arrive there the sun had risen when lot came to zoar then jehovah caused brimstone and fire from heaven to rain upon sodom and gomorrah and he destroyed those cities and all the plain with all the people who lived in it and all that grew on the ground but lot s wife who was following him looked back and she became a pillar of salt early in the morning abraham rose and went to the place where he had stood before jehovah and as he looked toward sodom and gomorrah and all the plain he saw the smoke of the land going up as the smoke of a smelting furnace god s care for the boy ishmael jehovah remembered what he had told sarah and he did as he had promised so sarah had a son and when the child grew up abraham made a great feast on the day that he was weaned but sarah saw the son of hagar the egyptian and of abraham playing with her son isaac and she said to abraham drive out this slave girl and her son for the son of this slave girl shall not be heir with my son isaac this request was very displeasing to abraham because the boy was his son but jehovah said to abraham do not be displeased because of the boy and because of your slave girl listen to all that sarah says to you for isaac only and his children shall bear your name but i will also make of the son of the slave girl a great nation because he is your son then abraham rose early in the morning and took bread and a skin of water and gave it to hagar and he put the boy upon her shoulder and sent her away so she set out and wandered in the desert of beersheba when the water in the skin was gone she left the child under one of the desert shrubs and went a short distance away and sat down opposite him for she said let me not see the child die while she sat there the boy began to cry and jehovah heard the cry of the boy and said what troubles you hagar fear not for jehovah has heard the cry of the boy rise lift him up and hold him fast by the hand for i will make him a great nation and jehovah opened her eyes and she saw a well of water then she went and filled the skin with water and gave the boy a drink and jehovah cared for the boy and when he grew up he lived in the wilderness of paran and became a bowman and his mother secured a wife for him from egypt abraham s loyalty to god later jehovah tested abraham saying to him abraham and he answered here am i jehovah said take your son your only son isaac whom you love and go to the land of moriah and offer him there as a burnt offering on one of the mountains of which i shall tell you illustration publishing and ishmael in the painted by w l taylor so abraham rose early in the morning and saddled his ass and took two of his servants with him and his son isaac when he had split the wood for the burnt offering he set out for the place of which god had told him on the third day when abraham looked up and saw the place in the distance he said to his servants stay here with the ass while i and the lad go over there when we have worshipped we will come back to you then abraham took the wood for the burnt offering and laid it on isaac his son and he took the fire and the knife and they both went on together and isaac spoke to abraham his father and said my father and abraham answered yes my son isaac said here is the fire and the wood but where is the lamb for a burnt offering abraham answered my son god will himself provide a lamb for a burnt offering so the two went on together when they came to the place of which god had told him abraham built the altar there and laid the wood on it and bound isaac his son and laid him on the altar upon the wood then abraham reached out his hand and took the knife to kill his son but the angel of jehovah called to him from heaven saying abraham abraham and he answered here am i and he said do not put your hand upon the boy nor do anything to him for now i know that you love god for you have not refused to give your son your only son to him then abraham looked up and he saw a ram caught in the thicket by his horns so abraham took the ram and offered him up as a burnt offering instead of his son and he named the place jehovah jireh which means jehovah will provide the angel of jehovah again called to abraham and said jehovah declares because you have done this thing and have not kept back your son your only son i will surely bless you and i will make your children as many as the stars of the heavens and as the sand which is on the seashore so that they shall conquer their enemies and all the nations of the earth shall ask for themselves a blessing like theirs because you have obeyed my command how rebekah became the wife of isaac when abraham was very old and jehovah had blessed him in every way abraham said to the eldest of his household servants who had charge of all his affairs put your hand under my hip while i make you promise by jehovah the god of heaven and earth that you will not let my son marry one of the daughters of the canaanites among whom i live but that you will go to my own country and to my relatives and there get a wife for my son isaac the servant said to him perhaps the woman will not be willing to follow me to this land must i then take your son back to the land from which you came abraham said to him see to it that you do not take my son back there jehovah the god of heaven who took me from my father s house and from my native land and who solemnly promised me to your children i will give this land will send his angel before you and there you will get a wife for my son but if the woman is not willing to come with you then you will be free from this promise to me only never take my son back there so the servant put his hand under abraham s hip and made the promise then the servant took ten of his master s camels and set out with precious gifts from his master so he went to the town of nahor and he made the camels kneel down outside the town by the well in the evening at the time when women go out to draw water then he said o jehovah the god of my master abraham give me i pray thee success to day and show kindness to my master abraham here i am standing by the spring of water and the daughters of the men of the town are coming out to draw water may that young woman to whom i shall say please let down your water jar that i may drink and who answers drink and i will also water your camels may she be the one thou hast chosen for thy servant isaac by this i shall know that thou hast shown kindness to my master then even before he was through speaking rebekah who was the grand daughter of nahor abraham s brother came out with her water jar upon her shoulder she was very beautiful and unmarried she went down to the spring filled her jar and came up then the servant ran to meet her and said please let me drink a little water from your jar she answered drink sir and quickly let down her water jar from her shoulder upon her hand and gave him a drink illustration testing of painted by fritz von uhde when she had finished giving him a drink she said i will draw water for your camels also until they have finished drinking so she quickly emptied her jar into the trough and ran again to the well to draw water and drew for all his camels meanwhile the man was silently gazing at her in order to find out whether jehovah had made his journey successful or not as soon as the camels had finished drinking the man took a gold ring five ounces in weight and put it in her nose and put on her arms two golden bracelets weighing five ounces and said whose daughter are you tell me i beg of you is there room in your father s house for us to spend the night she answered i am the grand daughter of milcah and nahor we have plenty of straw and feed and there is a place for you to spend the night then the man bowed his head and worshipped jehovah saying blessed be jehovah the god of my master abraham who has continued to show his mercy and his faithfulness toward my master as for me jehovah has led me on the way to the house of my master s relatives then the young woman ran and told these things to her mother s family now rebekah had a brother named laban and laban ran out to the man at the spring and when he saw the bracelets on his sister s hands and the ring and when he heard rebekah say this is what the man said to me he went to the man who was still standing by the camels at the spring and said come in you who are blessed by jehovah why do you stand outside for i have cleared the house and have room for the camels so he brought the man into the house and took the packs off the camels and furnished straw and feed for them and water to wash his feet and the feet of the men who were with him but when food was set before him to eat he said i will not eat until i have made known my errand they answered speak he said i am abraham s servant and jehovah has blessed my master greatly so that he has become very rich he has given him flocks and herds silver and gold servants and camels and asses now sarah my master s wife had a son when she was old and my master has given him all that he has my master also made me promise saying do not let my son marry one of the daughters of the canaanites in whose land i live but go to my father s home and to my relatives and there find a wife for my son when i said to my master what if the woman will not follow me he said to me jehovah whom i love and serve will send his angel with you and make you successful and you will find for my son a wife from among my relatives and my father s family then you shall be free from your promise to me but if you go to my family and they do not give her to you you shall also be free from your promise to me so i came to day to the spring and said o jehovah the god of my master abraham see i am standing by the spring of water if thou wilt make the errand on which i am going successful then let the young woman who comes to draw to whom i say please give me a little water from your jar to drink and who shall say to me drink and i will also draw for your camels let that one be the woman whom jehovah has chosen for my master s son even before i was through speaking rebekah came out with her water jar on her shoulder and went down to the spring and drew water and when i said to her please let me drink she quickly let down her water jar from her shoulder and answered drink and i will also water your camels so i drank and she also watered the camels then i asked her whose daughter are you and she said the grand daughter of nahor and milcah so i put the ring in her nose and the bracelets on her arms and i bowed my head and worshipped and blessed jehovah the god of my master abraham who had led me on the right way to find the daughter of my master s brother for his son tell me whether or not you will deal kindly and truly with my master so that i shall know what to do then laban and his family answered the matter is in the hands of jehovah we cannot say either yes or no see rebekah is before you take her and go and let her be the wife of your master s son as jehovah has said when abraham s servant heard their words he bowed to the ground before jehovah then he brought out gold and silver ornaments and clothing and gave them to rebekah he also gave costly gifts to her brother and to her mother and he and the men who were with him ate and drank and spent the night there when they rose in the morning the servant said send me away to my master but rebekah s brother and mother answered let the young woman stay with us a month or at least ten days after that she may go but he said to them do not delay me for jehovah has given me success send me away that i may go to my master illustration publishing comes to painted by w l taylor then they said we will call the young woman and ask her so they called rebekah and said to her will you go with this man she answered i will go so they sent away their sister rebekah and her nurse with abraham s servant and his men they also blessed rebekah saying to her our sister may your children and their children become thousands and thousands then rebekah set out with her maids and riding upon the camels they followed the man so the servant took rebekah and went away now abraham had given all that he had to isaac and had breathed his last dying in a good old age satisfied with living in the evening when isaac had gone out in the field to meditate he looked up and saw camels coming rebekah too looked up and when she saw isaac she quickly alighted from the camel and said to the servant who is this man walking in the field to meet us when the servant said it is my master she took her veil and covered her face then the servant told isaac all that he had done and isaac brought rebekah to the tent of sarah his mother and she became his wife and he loved her how jacob deceived his father now isaac prayed to jehovah for his wife because she had no children and jehovah heard his prayer and rebekah became the mother of twin boys they named one esau and the other jacob as they grew up esau became a skilful hunter a man who lived out in the fields but jacob was a quiet man who stayed about the tents isaac loved esau for he was fond of game but rebekah loved jacob once when jacob was preparing a stew esau came in from the fields and he was very hungry so he said to jacob let me swallow some of that red stew for i am very hungry but jacob said sell me first of all your right as the eldest esau replied see i am nearly dead now so of what use is this birthright to me jacob said first solemnly promise to give it to me so esau solemnly promised and sold his birthright to jacob then jacob gave esau bread and stewed le
Number of words w/o duplicates is : 1425
Capacity of words array is: 16384
the children s bible selections from old and new testaments translated arranged by henry a sherman head of department religious literature charles scribner sons foster kent woolsey professor biblical in yale university illustration curtis publishing company suffer little to come unto me forbid them not for such is kingdom god york mcmxxxvi copyright all rights reserved including that translation into foreign languages scandinavian printed united states america preface provides simple english both testament these have been made as result more than twenty five years observation study text itself but language child so it may easily be read younger those who are older words one syllable while reading he should gradually learn meaning idioms contains foundations on which life must built immortal stories songs his richest inheritance past give him this heritage form can understand enjoy duty privilege parents teachers hoped will meet need demand educators alike long felt often expressed most suited needs interests also believed after has learned appreciate love eager able whole with genuine interest understanding contents page story creation good gifts man first disobedience cain brother abel noah great flood tower babel abraham friend lot escape wicked city care boy ishmael loyalty how rebekah became wife isaac jacob deceived father dream deceiver meeting had wronged joseph sold slave brothers eagerness help others prisoner mighty ruler testing forgiveness family boyhood training moses voice bush pharaoh stubborn cost being cruel egypt commands people our duties report hebrew spies last crossing river jordan capture jericho ai women saved nation gideon brave band jephthah foolish promise samson did they strong lost strength devotion ruth samuel prophet ark among philistines found leader jonathan deed david victory over giant saul mean jealousy lie soldier spared enemy abigail sensible advice making best trouble death two warriors shepherd was called lead jerusalem capital kindness son rich thief absalom ungrateful broken hearted solomon israel young wise choice building temple rehoboam mistake elijah widow fire low whisper ahab micaiah courage telling truth mantle elisha healing sick girl helped her master way treating enemies end selfish joash throne judah said send jeremiah call do hard task josiah book law writing an ancient danger sad fate guilty four captives king strange test handwriting wall daniel lions den queen esther rebuilding nehemiah answer overcoming difficulties knight jonah narrow minded patriot job glory loving creator whom things goodness mercy seeing always watches protects protection trust trusting prayer safety refuge joy worshipping what asks worship praise song place world reward doing right rewards listening likes dislikes try well happy importance willing honor your troubles lazy better riches eating drinking use tongue control temper means modest generous jesus born at bethlehem men bring questions john baptist tells work decides wins devoted friends wedding cana ten lepers pool talks samaritan woman giving heals cures cannot walk makes even wrong doers finds calms storm visits home calls together helpers following teachings sinners readiness pray why we commandments modesty unselfishness money different ways using talents treat us golden rule really sends out missionaries praises feeds hungry clean kind stranger heroic glorified become zaccheus gladly welcomed fights condemns pretend warns disciples blind came brings lazarus back gave eats supper encourages seized mob hands crucified conquers walks gives command wonders day pentecost lame beautiful gate generosity early christians stephen christian martyr philip ethiopian peter roman officer prison paul account saw heard damascus church antioch barnabas lands went macedonia silas speech athens writes thessalonica corinth showing trials victories ephesus rome journey preached judges shipwreck faith won faithful heaven earth illustrations color lord my painted w l taylor facing hagar wilderness comes parting isaiah lo i lift up mine eyes hills nativity three o town seeking sheep herbert moore prodigal lowly hermitte duotone j james tissot fritz von uhde converses finding juliaan de vriendt ryland briton riviere denouncing haman ernest normand christ fishermen e zimmerman raising daughter jairus g r mary martha h siemiradzki sower hilltop c slade emmaus eug ne girardet st preaching raphael beginning heavens still unformed let there light then separated darkness night evening morning sky divide waters below above done second under brought dry land appear were seas plants trees grow grew each plant bringing forth its own seed tree fruit third lights separate signs mark seasons days sun moon greater lesser stars placed throw upon fourth many living creatures birds fly large sea monsters kinds abound blessed saying increase fill fifth cattle creeping wild beasts everything crawls ground make like ourselves fish crawl himself male female live conquer every thing see you grows bears shall food beast bird alive green herb when very sixth finished seventh rested holy time jehovah no or yet sent rain till soil mist rose watered dust taken breathed breath planted garden eden far east pleasant look knowledge evil took put eat wish except if surely die alone companion would name whatever fall deep sleep slept ribs closed flesh rib because she body now serpent deceitful any other animal answered middle nor touch knows soon opened know some ate husband knew naked sewed fig leaves girdles themselves sound footsteps walking cool hid where thy afraid myself told eaten forbade thou didst replied hated belly serpents bruise wound heel greatly pain subject listened earn only raise go return garments skins clothed adam named eve mother beings farmer offering grain grown too animals flock sacrificed their fat pieces pleased please angry face showed scowl accepted sin crouches door desire overcome field struck killed am keeper hark blood crying condemned receive hand whenever longer yield tramp wanderer punishment bear hast driven thee whoever kill kills punished sevenfold keep killing presence lived away growing thoughts grieved regretted therefore completely destroy off regret favor decided filled acts going yourself cypress wood build rooms cover within without pitch hundred feet eighty wide fifty high roof side lower about floods water creature enter household upright fit sacrifice take seven forty nights commanded wives creeps entered fell shut higher raised lifted died left remembered caused wind blow down ceased withdrew window raven kept fro until dried dove gone surface rest foot returned covered reached waited again dusk mouth freshly plucked olive leaf covering looked altar offered burnt offerings never condemn remains seedtime harvest cold heat summer winter cease sign solemn agreement between rainbow cloud seen remember spoke travelled westward broad valley babylonia another bricks thoroughly bake stone asphalt mortar whose top thus landmark scattered nothing plan seem difficult confuse stopped confusion confused shem ham japheth terah descendant nahor haran country relatives house show bless famous blessing families ask set seventy sarah started canaan passed through shechem oak moreh appeared removed hill near bethel pitched tent prayed silver gold flocks herds tents enough support quarrel herdsmen beg yours before plain zoar everywhere chose cities moved sodom sinned against northward southward eastward forever count counted rise length breadth grove mamre hebron oaks sitting entrance stood ran bowed sirs pass servant since wash refresh yourselves afterward hastened ready quickly measures fine meal knead cakes herd calf tender prepared curd milk served nine months along start complaint gomorrah committed terrible sins whether exactly turned direction drew wilt sweep righteous suppose spare slay treated judge just find sake dared speak though ashes lacking lack oh thirty seest once angels human turn aside spend street urged strongly feast baked bread yeast lain quarter surrounded shadow stand worse pressed advanced break smote small blindness tired searching else here daughters concerning thought jesting dawn get swept hesitated led outside merciful run behind stay anywhere heights shown saving lest overtake village granted spoken haste arrive risen brimstone destroyed pillar salt toward smoke smelting furnace promised weaned egyptian playing drive heir request displeasing displeased listen says skin shoulder wandered desert beersheba shrubs short distance sat opposite began cry fear hold fast drink cared paran bowman secured later tested moriah offer mountains tell saddled ass servants split lad worshipped laid knife yes lamb provide bound angel anything refused ram caught thicket horns instead jireh declares sand seashore nations theirs obeyed eldest charge affairs hip marry canaanites perhaps follow native solemnly free camels precious kneel draw success standing spring coming say jar answers chosen speaking grand unmarried sir emptied trough meanwhile silently gazing order successful ring ounces weight nose arms bracelets weighing room milcah plenty straw feed continued faithfulness laban sister cleared packs furnished known errand given asses serve drank asked deal kindly truly matter either ornaments clothing costly spent month least delay nurse thousands maids riding followed dying age satisfied meditate alighted camel veil loved twin boys esau skilful hunter fields quiet stayed fond game preparing stew swallow red sell nearly dead birthright stewed le


About

ArrayList implementation from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages